LocalBoundingVolume (struct)

A LocalBoundingVolume is a union structure for expressing multiple simple bounding volume types, such as a box, a sphere, a cone, a pyramid and infinite.

LocalBoundingVolume LocalBoundingVolume LocalBoundingVolume

Members

Integer type The type of bounding volume (LocalBoundingVolume_infinite, LocalBoundingVolume_bBox, LocalBoundingVolume_bSphere, LocalBoundingVolume_bCone, LocalBoundingVolume_bPyramid)
Vec3 pt1 union; usage depends on bounding volume type
Vec3 pt2 union; usage depends on bounding volume type
Scalar sc1 union; usage depends on bounding volume type
Scalar sc2 union; usage depends on bounding volume type
Scalar sc3 union; usage depends on bounding volume type
Scalar sc4 union; usage depends on bounding volume type

Methods

  LocalBoundingVolume ( in LocalBoundingVolume other )
  LocalBoundingVolume ()
LocalBoundingVolume clone ? ()
String getDesc ? ()
Boolean pyramidNearPlaneIntersectsBVol ? ( in Mat44 pyrTransform, in LocalBoundingVolume localBVol, in Mat44 transform )

Box methods

  bBoxAdd ! ( in Vec3 pt )
  bBoxAddBBox ! ( in Vec3 min, in Vec3 max )
  bBoxAddTransformedBBox ! ( in LocalBoundingVolume other, in Mat44 transform )
Boolean bBoxContains ? ( in Vec3 point )
Vec3 bBoxGetMax ? ()
Vec3 bBoxGetMin ? ()
Mat44 bBoxGetOrthographicMat44 ? ()
Scalar bBoxGetVolume ? ()
  bBoxInit ! ( in Vec3 min, in Vec3 max )
  bBoxInit ! ()
  bBoxSetMax ! ( in Vec3 max )
  bBoxSetMin ! ( in Vec3 min )

Cone methods

Scalar bConeGetCosHalfAngle ? ()
Scalar bConeGetCutoff ? ()
Vec3 bConeGetLocalDistanceVector ? ( in Vec3 point )
Scalar bConeGetRadAngle ? ()
Scalar bConeGetTanHalfAngle ? ()
  bConeInit ! ( in Scalar radAngle, in Scalar cutoff )
  bConeSetCutoff ! ( in Scalar cutoff )
  bConeSetRadAngle ! ( in Scalar radAngle )

Pyramid methods

Scalar bPyramidGetFar ? ()
Scalar bPyramidGetNear ? ()
Scalar bPyramidGetNearHeight ? ()
Scalar bPyramidGetNearWidth ? ()
Mat44 bPyramidGetPerspectiveMat44 ? ()
  bPyramidInit ! ( in Scalar nearWidth, in Scalar nearHeight, in Scalar near, in Scalar far )
  bPyramidSetFar ! ( in Scalar far )
  bPyramidSetNear ! ( in Scalar near )
  bPyramidSetNearHeight ! ( in Scalar nearHeight )
  bPyramidSetNearWidth ! ( in Scalar nearWidth )

Sphere methods

Boolean bSphereContains ? ( in Vec3 point )
Vec3 bSphereGetCenter ? ()
Vec3 bSphereGetLocalDistanceVector ? ( in Vec3 point )
Scalar bSphereGetRadius ? ()
Scalar bSphereGetSquaredRadius ? ()
  bSphereInit ! ( in Vec3 center, in Scalar radius )
Boolean bSphereIntersectsBSphere ? ( in Vec3 center, in Scalar radius )
  bSphereSetCenter ! ( in Vec3 center )
  bSphereSetRadius ! ( in Scalar radius )

Methods in detail

LocalBoundingVolume ( in LocalBoundingVolume other )

copy constructor


LocalBoundingVolume ()

default constructor


LocalBoundingVolume LocalBoundingVolume.clone? ()

clone method


String LocalBoundingVolume.getDesc? ()

Returns a description of the LocalBoundingVolume


Boolean LocalBoundingVolume.pyramidNearPlaneIntersectsBVol? ( in Mat44 pyrTransform, in LocalBoundingVolume localBVol, in Mat44 transform )


Box methods

LocalBoundingVolume.bBoxAdd! ( in Vec3 pt )

Grows the bounding box to include a point (LocalBoundingVolume must be a box)


LocalBoundingVolume.bBoxAddBBox! ( in Vec3 min, in Vec3 max )

Grows the bounding box to include another bounding box, defined by min and max (LocalBoundingVolume must be a box)


LocalBoundingVolume.bBoxAddTransformedBBox! ( in LocalBoundingVolume other, in Mat44 transform )

Grows the bounding box to include a transformed bounding box (LocalBoundingVolume must be a box)


Boolean LocalBoundingVolume.bBoxContains? ( in Vec3 point )

Returns true if point is in or on the bounding box (LocalBoundingVolume must be a box)


Vec3 LocalBoundingVolume.bBoxGetMax? ()

If the LocalBoundingVolume is a box, returns the max


Vec3 LocalBoundingVolume.bBoxGetMin? ()

If the LocalBoundingVolume is a box, returns the min


Mat44 LocalBoundingVolume.bBoxGetOrthographicMat44? ()

Returns the orthographic projection matrix corresponding to the bounding box range, with -Z as the view direction (LocalBoundingVolume must be a box)


Scalar LocalBoundingVolume.bBoxGetVolume? ()

Returns the bounding box volume (LocalBoundingVolume must be a box)


LocalBoundingVolume.bBoxInit! ( in Vec3 min, in Vec3 max )

Initializes the LocalBoundingVolume as a bounding box


LocalBoundingVolume.bBoxInit! ()

Initializes the LocalBoundingVolume as a bounding box


LocalBoundingVolume.bBoxSetMax! ( in Vec3 max )

Sets the bounding box max (LocalBoundingVolume must be a box)


LocalBoundingVolume.bBoxSetMin! ( in Vec3 min )

Sets the bounding box min (LocalBoundingVolume must be a box)


Cone methods

Scalar LocalBoundingVolume.bConeGetCosHalfAngle? ()

Returns the cached value of cos(angle/2) of the cone (LocalBoundingVolume must be a cone)


Scalar LocalBoundingVolume.bConeGetCutoff? ()

Returns the height (cutoff) of the cone (LocalBoundingVolume must be a cone)


Vec3 LocalBoundingVolume.bConeGetLocalDistanceVector? ( in Vec3 point )

Returns the local distance vector from the cone to a point (LocalBoundingVolume must be a cone)


Scalar LocalBoundingVolume.bConeGetRadAngle? ()

Returns the angle of the cone in radian (LocalBoundingVolume must be a cone)


Scalar LocalBoundingVolume.bConeGetTanHalfAngle? ()

Returns the cached value of tan(angle/2) of the cone (LocalBoundingVolume must be a cone)


LocalBoundingVolume.bConeInit! ( in Scalar radAngle, in Scalar cutoff )

Initializes the LocalBoundingVolume as a cone


LocalBoundingVolume.bConeSetCutoff! ( in Scalar cutoff )

Sets the height (cutoff) of the cone (LocalBoundingVolume must be a cone)


LocalBoundingVolume.bConeSetRadAngle! ( in Scalar radAngle )

Sets the angle of the cone, in radian (LocalBoundingVolume must be a cone)


Pyramid methods

Scalar LocalBoundingVolume.bPyramidGetFar? ()

Returns the far distance of the truncated pyramid (LocalBoundingVolume must be a pyramid)


Scalar LocalBoundingVolume.bPyramidGetNear? ()

Returns the near distance of the truncated pyramid (LocalBoundingVolume must be a pyramid)


Scalar LocalBoundingVolume.bPyramidGetNearHeight? ()

Returns the near height of the truncated pyramid (LocalBoundingVolume must be a pyramid)


Scalar LocalBoundingVolume.bPyramidGetNearWidth? ()

Returns the near width of the truncated pyramid (LocalBoundingVolume must be a pyramid)


Mat44 LocalBoundingVolume.bPyramidGetPerspectiveMat44? ()

Returns the perspective transform corresponding to the bounding pyramid (LocalBoundingVolume must be a pyramid)


LocalBoundingVolume.bPyramidInit! ( in Scalar nearWidth, in Scalar nearHeight, in Scalar near, in Scalar far )

Initializes the LocalBoundingVolume as a truncated pyramid


LocalBoundingVolume.bPyramidSetFar! ( in Scalar far )

Sets the far distance of the truncated pyramid (LocalBoundingVolume must be a pyramid)


LocalBoundingVolume.bPyramidSetNear! ( in Scalar near )

Sets the near distance of the truncated pyramid (LocalBoundingVolume must be a pyramid)


LocalBoundingVolume.bPyramidSetNearHeight! ( in Scalar nearHeight )

Sets the near height of the truncated pyramid (LocalBoundingVolume must be a pyramid)


LocalBoundingVolume.bPyramidSetNearWidth! ( in Scalar nearWidth )

Sets the near width of the truncated pyramid (LocalBoundingVolume must be a pyramid)


Sphere methods

Boolean LocalBoundingVolume.bSphereContains? ( in Vec3 point )

Returns true if the point is inside the bounding sphere (LocalBoundingVolume must be a sphere)


Vec3 LocalBoundingVolume.bSphereGetCenter? ()

Returns the center of a bounding sphere (LocalBoundingVolume must be a sphere)


Vec3 LocalBoundingVolume.bSphereGetLocalDistanceVector? ( in Vec3 point )

Returns the distance vector from a point to this sphere (LocalBoundingVolume must be a sphere)


Scalar LocalBoundingVolume.bSphereGetRadius? ()

Returns the radius of a bounding sphere (LocalBoundingVolume must be a sphere)


Scalar LocalBoundingVolume.bSphereGetSquaredRadius? ()

Returns the squared radius of a bounding sphere (LocalBoundingVolume must be a sphere)


LocalBoundingVolume.bSphereInit! ( in Vec3 center, in Scalar radius )

Initializes the LocalBoundingVolume as a bounding sphere


Boolean LocalBoundingVolume.bSphereIntersectsBSphere? ( in Vec3 center, in Scalar radius )

Returns true if the sphere intersects the input sphere (LocalBoundingVolume must be a sphere)


LocalBoundingVolume.bSphereSetCenter! ( in Vec3 center )

Sets the center of a bounding sphere (LocalBoundingVolume must be a sphere)


LocalBoundingVolume.bSphereSetRadius! ( in Scalar radius )

Sets the radius of a bounding sphere (LocalBoundingVolume must be a sphere)

注釈

treats ‘negative’ values as an infinite radius