WorldBoundFrustum Class
UnigineScript is deprecated and will be removed in future releases. Please consider using C#/C++ instead, as these APIs are the preferred ones. Availability of new Engine features in UnigineScipt is not guaranteed, as the current level of support assumes only fixing critical issues.
WorldBoundFrustum Class
Members
static WorldBoundFrustum ( ) #
Default constructor.WorldBoundFrustum ( mat4 projection, dmat4 modelview ) #
Constructor. Initializes the bounding frustum by given matrices.Arguments
- mat4 projection - A projection matrix.
- dmat4 modelview - A modelview matrix.
WorldBoundFrustum ( WorldBoundFrustum bf ) #
Constructor. Initializes by given bounding frustum.Arguments
- WorldBoundFrustum bf - The bounding frustum.
WorldBoundFrustum ( BoundFrustum bf, dmat4 itransform ) #
Constructor. Initializes by given bounding frustum and transformation matrix.Arguments
- BoundFrustum bf - The bounding frustum.
- dmat4 itransform - The inverse transformation matrix.
WorldBoundFrustum ( WorldBoundFrustum bf, dmat4 transform ) #
Constructor. Initializes by given bounding frustum and transformation matrix.Arguments
- WorldBoundFrustum bf - The bounding frustum.
- dmat4 transform - The transformation matrix.
void clear ( ) #
Clears the bounding frustum.void set ( mat4 projection, dmat4 modelview ) #
Sets the bounding frustum by given matrices.Arguments
- mat4 projection - A projection matrix.
- dmat4 modelview - A modelview matrix.
void set ( WorldBoundFrustum bf ) #
Sets the bounding frustum by given bounding frustum.Arguments
- WorldBoundFrustum bf - The bounding frustum.
void set ( BoundFrustum bf, dmat4 itransform ) #
Sets the bounding frustum by given bounding frustum and transformation matrix.Arguments
- BoundFrustum bf - The bounding frustum.
- dmat4 itransform - The inverse transformation matrix.
void set ( WorldBoundFrustum bf, dmat4 itransform ) #
Sets the bounding frustum by given bounding frustum and transformation matrix.Arguments
- WorldBoundFrustum bf - The bounding frustum.
- dmat4 itransform - The inverse transformation matrix.
int inside ( dvec3 point ) #
Checks if the point is inside the bounding frustum.Arguments
- dvec3 point - The coordinates of the point.
Return value
1 if the point is inside the bounding frustum; otherwise, 0.int inside ( dvec3 point, double radius ) #
Checks if the sphere is inside the bounding frustum.Arguments
- dvec3 point - The coordinates of the center of the sphere.
- double radius - The sphere radius.
Return value
1 if the sphere is inside the bounding frustum; otherwise, 0.int inside ( dvec3 min, dvec3 max ) #
Checks if the box is inside the bounding frustum.Arguments
- dvec3 min - The box minimum coordinate.
- dvec3 max - The box maximum coordinate.
Return value
1 if the box is inside the bounding frustum; otherwise, 0.int inside ( dvec3[] points ) #
Checks if a set of points is inside the bounding frustum.Arguments
- dvec3[] points - Array of points.
Return value
1 if the points are inside the bounding frustum; otherwise, 0.int inside ( WorldBoundBox bb ) #
Checks if the bounding box is inside the bounding frustum.Arguments
- WorldBoundBox bb - The bounding box.
Return value
1 if the bounding box is inside the bounding frustum; otherwise, 0.int inside ( WorldBoundSphere bs ) #
Checks if the bounding sphere is inside the bounding frustum.Arguments
- WorldBoundSphere bs - The bounding sphere.
Return value
1 if the bounding sphere is inside the bounding frustum; otherwise, 0.int insideAll ( WorldBoundBox bb ) #
Checks if the whole given bounding box is inside the current bounding frustum.Arguments
- WorldBoundBox bb - The bounding box.
Return value
1 if the whole box is inside the bounding frustum; otherwise, 0.int insideAll ( WorldBoundSphere bs ) #
Checks if the whole given bounding sphere is inside the current bounding frustum.Arguments
- WorldBoundSphere bs - The bounding sphere.
Return value
1 if the whole sphere is inside the bounding frustum; otherwise, 0.int insideShadowValid ( WorldBoundSphere object, dvec3 direction ) #
Checks if the given bounding sphere is inside the shadow of the current bounding frustum.The method doesn't check the status of the current bounding frustum.
Arguments
- WorldBoundSphere object - Bounding sphere.
- dvec3 direction - The direction vector.
Return value
1 if the given bounding sphere is inside the shadow; otherwise, 0.bool isValid ( ) #
Checks the bounding frustum status.Return value
true if the bounding frustum is valid, otherwise false.dvec3 getCamera ( ) #
Returns the position of the camera.Return value
Camera position.dvec4[] getPlanes ( ) #
Returns the bounding frustum cliping planes array.Return value
The bounding frustum cliping planes array.Last update:
2020-04-10
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)