Skip to content

Bounds (JavaScript)

Bounds

Scripting Name:Insight.Bounds

包围盒。

Properties


center

type :Insight.Vector3

包围盒中心。

extents

type :Insight.Vector3

包围盒长宽高的一半。

max

type :Insight.Vector3

包围盒的最大点,值为 center + extents。

min

type :Insight.Vector3

包围盒的最小点,值为 center - extents。

size

type :Insight.Vector3

包围盒的长宽高。

Methods


toString

public string toString();

将 bound 内容以一定格式转为 string 类型。

contains

public boolean contains( Insight.Vector3 point );

判断空间中一点是否在此包围盒内。

Parameters

intersectRay

public boolean intersectRay( Insight.Ray ray );

判断一条射线是否与此包围盒相交。

Parameters

setMinMax

public void setMinMax( Insight.Vector3 min, Insight.Vector3 max );

设置包围盒的最小点和最大点。

Parameters