The BoundFrustum class is used to create a frustum.

BoundFrustum 类用于创建截锥体。

实现

  • IClone

构造函数

访问器

方法

  • 参数

    返回 number

    The spatial relationship:

    • 1: The bounding box is inside the frustum.
    • 2: The bounding box intersects the frustum.
    • 0: The bounding box is outside and does not intersect the frustum.

    Determines the spatial relationship between this frustum and a bounding box.

    确定这个截锥体和包围盒之间的空间关系。

  • 参数

    返回 number

    The relationship type:

    • 1: The sphere is inside the frustum.
    • 2: The sphere intersects the frustum.
    • 0: The sphere is outside and does not intersect the frustum.

    Determines the spatial relationship between this frustum and a bounding sphere.

    确定这个截锥体和包围球之间的空间关系。

  • 参数

    返回 number

    The relationship between the point and the frustum:

    • 1: The point is inside the frustum.
    • 2: The point intersects the frustum.
    • 0: The point is outside and does not intersect the frustum.

    Determines the relationship between the frustum and a point.

    确定截锥体与点的关系。

  • 参数

    返回 boolean

    Determines whether this bound frustum is equal to another bound frustum.

    判断这个截锥体是否与另一个截锥体相等。

  • 参数

    • obj: any

      The object to compare.

    返回 boolean

    Determines whether this object is equal to another object.

    判断此对象是否等于另一个对象。

  • 参数

    • index: number

      The index of the plane to retrieve. Indices:

      • 0: Near plane
      • 1: Far plane
      • 2: Left plane
      • 3: Right plane
      • 4: Top plane
      • 5: Bottom plane

    返回 Plane

    The requested plane or null if the index is out of range.

    Gets a specific plane of the frustum.

    获取截锥体的特定平面。

  • 参数

    返回 boolean

    true if they intersect; otherwise, false.

    Determines whether this frustum intersects with a bounding box.

    判断这个截锥体是否与包围盒相交。

  • 参数

    • p1: Plane

      The first plane.

    • p2: Plane

      The second plane.

    • p3: Plane

      The third plane.

    • out: Vector3

      The vector to store the intersection point.

    返回 void

    Calculates the intersection point of three planes within the frustum.

    计算截锥体中三个平面的交点。

  • 参数

    • m: Matrix4x4

      The matrix that describes the frustum.

    • np: Plane

      The near plane.

    • fp: Plane

      The far plane.

    • lp: Plane

      The left plane.

    • rp: Plane

      The right plane.

    • tp: Plane

      The top plane.

    • bp: Plane

      The bottom plane.

    返回 void

    Obtain 6 enclosing planes based on the matrix.

    根据矩阵获取6个包围平面。