Class for frustum-culling.
More...
#include <FrustumCull.h>
Class for frustum-culling.
◆ Classification
Enum for classification of intersection
◆ pointInFrustum()
Checks if a point lies inside the frustum region
- Parameters
-
p | coordinates of the point to check |
- Returns
- INSIDE or OUTSIDE depending on if the point lies inside or outside of the frustum region
◆ setCamDef()
void FrustumCull::setCamDef |
( |
const glm::vec3 & |
p, |
|
|
const glm::vec3 & |
l, |
|
|
const glm::vec3 & |
u |
|
) |
| |
Sets the parameters needed for calculation of frustum planes. These parameters come from the camera position and orientation. Calling this function updates the Culling Planes.
- Parameters
-
p | position of camera |
l | coordinates of point where the camera looks at / focus point. |
u | Vector pointing up from the camera. |
l,u | define the camera coordinate system. |
◆ setCamInternals()
void FrustumCull::setCamInternals |
( |
float |
angle, |
|
|
float |
ratio, |
|
|
float |
nearD, |
|
|
float |
farD |
|
) |
| |
Sets the parameters needed for calculation of frustum planes. These parameters come from the camera projection
- Parameters
-
angle | Field of view of camera in degrees. |
ratio | Aspect ratio. |
nearD | Near plane z. |
farD | Far plane z. |
◆ sphereInFrustum()
Checks the intersection of a sphere with the frustum region
- Parameters
-
p | coordinates of the center of the sphere. |
raio | radius of the sphere |
- Returns
- INSIDE, INTERSECT or OUTSIDE, depending if the circle lies totally inside or partially inside or outside the frustum region
The documentation for this class was generated from the following files: