LocalBoundingVolume.kl¶
Types¶
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.
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 ) |
Functions¶
transformedBBoxGetVectors¶
transformedBBoxGetVectors ( in Mat44 transform, in LocalBoundingVolume localBVol, out Vec3 origin, out Vec3 dX, out Vec3 dY, out Vec3 dZ )
Transforms the bounding box and returns a transformed origin and axis (dX, dY, dZ) (LocalBoundingVolume must be a box)
transformedBBoxGetBBox¶
transformedBBoxGetBBox ( in Mat44 transform, in LocalBoundingVolume localBVol, out Vec3 min, out Vec3 max )
Returns the global bounding box of a transformed bounding box (LocalBoundingVolume must be a box)
transformedBSphereGetBBox¶
transformedBSphereGetBBox ( in Mat44 transform, in LocalBoundingVolume localBVol, out Vec3 min, out Vec3 max )
Returns the bounding box of a transformed sphere (LocalBoundingVolume must be a sphere)
localBVolGetBSphere¶
localBVolGetBSphere ( in Mat44 transform, in LocalBoundingVolume localBVol, out Vec3 bSphereCenter, out Scalar bSphereSquaredRadius )
Returns a bounding sphere englobing the transformed LocalBoundingVolume
localBVolGetBBox¶
localBVolGetBBox ( in Mat44 transform, in LocalBoundingVolume localBVol, out Vec3 min, out Vec3 max )
Returns a bounding box englobing the transformed LocalBoundingVolume
getSquaredDistanceToTransformedBVol¶
Scalar getSquaredDistanceToTransformedBVol ( in LocalBoundingVolume localBVol, in Mat44 localBVolTransfo, in Vec3 globalPos )
Returns the distance from a point to a transformed LocalBoundingVolume