ht.Math.Frustum(p0, p1, p2, p3, p4, p5)

new Frustum(p0, p1, p2, p3, p4, p5)

使用六个面来构建一个视锥体

Parameters:
Name Type Attributes Description
p0 ht.Math.Plane <optional>
p1 ht.Math.Plane <optional>
p2 ht.Math.Plane <optional>
p3 ht.Math.Plane <optional>
p4 ht.Math.Plane <optional>
p5 ht.Math.Plane <optional>

Members

Array :Array.<number>

包含六个平面 planes 的数组

Methods

clone() → {ht.Math.Frustum}

返回一个与当前视锥体有相同参数的视锥体

Returns:
ht.Math.Frustum

containsPoint(point) → {boolean}

判断 point 是否在视锥体内

Parameters:
Name Type Description
point ht.Math.Vector3
Returns:
boolean

copy(Frustum) → {ht.Math.Frustum}

将传入 Frustum 的属性拷贝到当前视锥体

Parameters:
Name Type Description
Frustum ht.Math.Frustum
Returns:
ht.Math.Frustum

intersectsBox(Box3) → {boolean}

判断 Box3 是否与视锥体相交

Parameters:
Name Type Description
Box3 ht.Math.Box3
Returns:
boolean

intersectsObject(Object) → {boolean}

判断 Object 的包围球是否与视锥体相交

Parameters:
Name Type Description
Object Object
Returns:
boolean

intersectsSphere(Sphere) → {boolean}

判断 Sphere 是否与视锥体相交

Parameters:
Name Type Description
Sphere ht.Math.Sphere
Returns:
boolean

set(p0, p1, p2, p3, p4, p5) → {ht.Math.Frustum}

使用传入的平面设置当前视锥体

Parameters:
Name Type Description
p0 ht.Math.Plane
p1 ht.Math.Plane
p2 ht.Math.Plane
p3 ht.Math.Plane
p4 ht.Math.Plane
p5 ht.Math.Plane
Returns:
ht.Math.Frustum

setFromMatrix(Matrix4) → {ht.Math.Frustum}

Matrix4 用于设置 planes

Parameters:
Name Type Description
Matrix4 ht.Math.Matrix4
Returns:
ht.Math.Frustum