VR-Vantage
Loading...
Searching...
No Matches
makVrv::Frustum< T > Class Template Reference

Template for 32/64 bit bit frustums. More...

Inheritance diagram for makVrv::Frustum< T >:

Public Member Functions

 Frustum ()
 ctor
virtual ~Frustum ()
 dtor
template<class RHS>
 Frustum (const Frustum< RHS > &rhs)
 Copy Constructor.
template<class RHS>
Frustum & operator= (const Frustum< RHS > &rhs)
 Assignment Operator.
virtual void setPlane (FrustumPlane plane, T d, const DtVector3< T > &vNormal)
 set a frustum plane
virtual const DtPlane< T > & plane (FrustumPlane plane) const
 get a frustum plane
virtual DtVector4< T > planeAsVector (FrustumPlane plane) const
 get the frustum plane as a vector
virtual bool isVisible (const DtAxisAlignedBoundingBox< T > &box) const
 is bounding box visible within this frustum?
virtual bool isSphereVisible (const DtVector3< T > &center, T radius) const
 is bounding sphere visible within this frustum?
virtual bool isSphereVisibleRadiusSquared (const DtVector3< T > &center, double radiusSquared) const
 is bounding sphere (with a radius squared) visible within this frustum?
virtual VisibilityFromCamera visibility (const DtAxisAlignedBoundingBox< T > &box, bool ignoreNearFar=false) const
 get visibility of bounding box within the frustum
virtual void setFromModelViewProjectionMatrix (const DtMatrix4< T > &modelViewMat, const DtMatrix4< T > &projMat)
virtual void setFromModelViewProjectionMatrix (const DtMatrix4< T > &mvp)
 set up a frustum, given a model view projection matrix
virtual void frustumPlanes (std::array< DtVector4< T >, 6 > &planes) const
 get the frustum planes as DtVector4's
virtual bool operator== (const Frustum< T > &rhs) const
 equality
virtual bool operator!= (const Frustum< T > &rhs) const
 inequality
template<class RHS>
Frustum< T > & operator= (const Frustum< RHS > &rhs)

Protected Member Functions

void computePlaneFromPoints (DtPlane< T > &plane, const DtVector3< T > &point0, const DtVector3< T > &point1, const DtVector3< T > &point2) const
 Helper to compute a plane from 3 points.

Protected Attributes

std::array< DtPlane< T >, 6 > myFrustumPlanes

Detailed Description

template<class T>
class makVrv::Frustum< T >

Template for 32/64 bit bit frustums.

Constructor & Destructor Documentation

◆ Frustum() [1/2]

template<class T>
makVrv::Frustum< T >::Frustum ( )

ctor

Referenced by Frustum(), operator!=(), and operator==().

◆ ~Frustum()

template<class T>
makVrv::Frustum< T >::~Frustum ( )
virtual

dtor

◆ Frustum() [2/2]

template<class T>
template<class RHS>
makVrv::Frustum< T >::Frustum ( const Frustum< RHS > & rhs)

Copy Constructor.

References Frustum(), and myFrustumPlanes.

Member Function Documentation

◆ operator=() [1/2]

template<class T>
template<class RHS>
Frustum & makVrv::Frustum< T >::operator= ( const Frustum< RHS > & rhs)

Assignment Operator.

◆ setPlane()

template<class T>
void makVrv::Frustum< T >::setPlane ( FrustumPlane plane,
T d,
const DtVector3< T > & vNormal )
virtual

set a frustum plane

References myFrustumPlanes, and plane().

◆ plane()

template<class T>
const DtPlane< T > & makVrv::Frustum< T >::plane ( FrustumPlane plane) const
virtual

◆ planeAsVector()

template<class T>
DtVector4< T > makVrv::Frustum< T >::planeAsVector ( FrustumPlane plane) const
virtual

get the frustum plane as a vector

References myFrustumPlanes.

◆ isVisible()

◆ isSphereVisible()

template<class T>
bool makVrv::Frustum< T >::isSphereVisible ( const DtVector3< T > & center,
T radius ) const
virtual

is bounding sphere visible within this frustum?

References myFrustumPlanes, plane(), makVrv::DtVector3< T >::x, makVrv::DtVector3< T >::y, and makVrv::DtVector3< T >::z.

◆ isSphereVisibleRadiusSquared()

template<class T>
bool makVrv::Frustum< T >::isSphereVisibleRadiusSquared ( const DtVector3< T > & center,
double radiusSquared ) const
virtual

is bounding sphere (with a radius squared) visible within this frustum?

References myFrustumPlanes, plane(), makVrv::DtVector3< T >::x, makVrv::DtVector3< T >::y, and makVrv::DtVector3< T >::z.

◆ visibility()

◆ setFromModelViewProjectionMatrix() [1/2]

◆ setFromModelViewProjectionMatrix() [2/2]

template<class T>
void makVrv::Frustum< T >::setFromModelViewProjectionMatrix ( const DtMatrix4< T > & mvp)
virtual

◆ frustumPlanes()

◆ operator==()

template<class T>
bool makVrv::Frustum< T >::operator== ( const Frustum< T > & rhs) const
virtual

equality

References Frustum(), and myFrustumPlanes.

◆ operator!=()

template<class T>
bool makVrv::Frustum< T >::operator!= ( const Frustum< T > & rhs) const
virtual

inequality

References Frustum().

◆ computePlaneFromPoints()

template<class T>
void makVrv::Frustum< T >::computePlaneFromPoints ( DtPlane< T > & plane,
const DtVector3< T > & point0,
const DtVector3< T > & point1,
const DtVector3< T > & point2 ) const
protected

◆ operator=() [2/2]

template<class T>
template<class RHS>
Frustum< T > & makVrv::Frustum< T >::operator= ( const Frustum< RHS > & rhs)

Member Data Documentation

◆ myFrustumPlanes


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