ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
Frustum Class Reference

#include <ecvFrustum.h>

Collaboration diagram for Frustum:

Public Types

enum  Intersection { OUTSIDE = 0 , INTERSECT = 1 , INSIDE = 2 }
 

Public Member Functions

 Frustum ()=default
 
 Frustum (const ccGLMatrixd &modelViewMat, const ccGLMatrixd &projMat)
 
virtual ~Frustum ()=default
 
Intersection pointInFrustum (const CCVector3f &p) const
 
Intersection sphereInFrustum (const CCVector3f &c, float r) const
 
Intersection boxInFrustum (const AABox &box) const
 
Intersection boxInFrustum (const AACube &cube) const
 

Protected Types

enum  PLANE {
  TOP = 0 , BOTTOM = 1 , LEFT = 2 , RIGHT = 3 ,
  NEARP = 4 , FARP = 5
}
 

Protected Member Functions

template<typename T >
void initfromMPMatrix (const ccGLMatrixTpl< T > &MP)
 

Protected Attributes

Plane pl [6]
 

Detailed Description

Definition at line 85 of file ecvFrustum.h.

Member Enumeration Documentation

◆ Intersection

Enumerator
OUTSIDE 
INTERSECT 
INSIDE 

Definition at line 96 of file ecvFrustum.h.

◆ PLANE

enum Frustum::PLANE
protected
Enumerator
TOP 
BOTTOM 
LEFT 
RIGHT 
NEARP 
FARP 

Definition at line 155 of file ecvFrustum.h.

Constructor & Destructor Documentation

◆ Frustum() [1/2]

Frustum::Frustum ( )
default

◆ Frustum() [2/2]

Frustum::Frustum ( const ccGLMatrixd modelViewMat,
const ccGLMatrixd projMat 
)
inline

Definition at line 89 of file ecvFrustum.h.

References initfromMPMatrix().

◆ ~Frustum()

virtual Frustum::~Frustum ( )
virtualdefault

Member Function Documentation

◆ boxInFrustum() [1/2]

Intersection Frustum::boxInFrustum ( const AABox box) const
inline

Definition at line 128 of file ecvFrustum.h.

References AABox::getVertexN(), AABox::getVertexP(), INSIDE, INTERSECT, OUTSIDE, pl, and result.

◆ boxInFrustum() [2/2]

Intersection Frustum::boxInFrustum ( const AACube cube) const
inline

Definition at line 141 of file ecvFrustum.h.

References AACube::getVertexN(), AACube::getVertexP(), INSIDE, INTERSECT, OUTSIDE, pl, and result.

◆ initfromMPMatrix()

template<typename T >
void Frustum::initfromMPMatrix ( const ccGLMatrixTpl< T > &  MP)
inlineprotected

Definition at line 165 of file ecvFrustum.h.

References BOTTOM, ccGLMatrixTpl< T >::data(), FARP, LEFT, NEARP, pl, RIGHT, Plane::setCoefficients(), and TOP.

Referenced by Frustum().

◆ pointInFrustum()

Intersection Frustum::pointInFrustum ( const CCVector3f p) const
inline

Definition at line 103 of file ecvFrustum.h.

References INSIDE, OUTSIDE, and pl.

◆ sphereInFrustum()

Intersection Frustum::sphereInFrustum ( const CCVector3f c,
float  r 
) const
inline

Definition at line 113 of file ecvFrustum.h.

References INSIDE, INTERSECT, OUTSIDE, pl, and result.

Referenced by PointCloudLODRenderer::render().

Member Data Documentation

◆ pl

Plane Frustum::pl[6]
protected

Definition at line 187 of file ecvFrustum.h.

Referenced by boxInFrustum(), initfromMPMatrix(), pointInFrustum(), and sphereInFrustum().


The documentation for this class was generated from the following file: