Cinder  0.8.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Types | Public Member Functions | Protected Attributes | List of all members
cinder::Frustum< T > Class Template Reference

#include <Frustum.h>

Public Types

enum  {
  NEAR, FAR, LEFT, RIGHT,
  TOP, BOTTOM
}
 

Public Member Functions

 Frustum ()
 
 Frustum (const Camera &cam)
 
void set (const Camera &cam)
 Creates a frustum based on the camera's parameters. More...
 
void set (const Camera &cam, const Vec3< T > &ntl, const Vec3< T > &ntr, const Vec3< T > &nbl, const Vec3< T > &nbr)
 Creates a frustum based on the camera's parameters and four corners of a portal. More...
 
bool contains (const Vec3< T > &loc) const
 Returns TRUE if point is within frustum. More...
 
bool contains (const Sphere &sphere) const
 Returns TRUE if the sphere is fully contained within frustum. See also 'intersects'. More...
 
bool contains (const Vec3< T > &center, T radius) const
 Returns TRUE if the sphere is fully contained within frustum. See also 'intersects'. More...
 
bool contains (const AxisAlignedBox3f &box) const
 Returns TRUE if the box is fully contained within frustum. See also 'intersects'. More...
 
bool contains (const Vec3< T > &center, const Vec3< T > &size) const
 Returns TRUE if the box is fully contained within frustum. See also 'intersects'. More...
 
bool intersects (const Vec3< T > &loc) const
 Returns TRUE if point is within frustum. More...
 
bool intersects (const Sphere &sphere) const
 Returns TRUE if the sphere is partially contained within frustum. See also 'contains'. More...
 
bool intersects (const Vec3< T > &center, T radius) const
 Returns TRUE if the sphere is partially contained within frustum. See also 'contains'. More...
 
bool intersects (const AxisAlignedBox3f &box) const
 Returns TRUE if the box is partially contained within frustum. See also 'contains'. More...
 
bool intersects (const Vec3< T > &center, const Vec3< T > &size) const
 Returns TRUE if the box is partially contained within frustum. See also 'contains'. More...
 

Protected Attributes

Plane< T > mFrustumPlanes [6]
 

Member Enumeration Documentation

template<typename T >
anonymous enum
Enumerator
NEAR 
FAR 
LEFT 
RIGHT 
TOP 
BOTTOM 

Constructor & Destructor Documentation

template<typename T >
cinder::Frustum< T >::Frustum ( )
template<typename T >
cinder::Frustum< T >::Frustum ( const Camera cam)

Member Function Documentation

template<typename T >
void cinder::Frustum< T >::set ( const Camera cam)

Creates a frustum based on the camera's parameters.

template<typename T >
void cinder::Frustum< T >::set ( const Camera cam,
const Vec3< T > &  ntl,
const Vec3< T > &  ntr,
const Vec3< T > &  nbl,
const Vec3< T > &  nbr 
)

Creates a frustum based on the camera's parameters and four corners of a portal.

template<typename T >
bool cinder::Frustum< T >::contains ( const Vec3< T > &  loc) const

Returns TRUE if point is within frustum.

template<typename T >
bool cinder::Frustum< T >::contains ( const Sphere sphere) const

Returns TRUE if the sphere is fully contained within frustum. See also 'intersects'.

template<typename T >
bool cinder::Frustum< T >::contains ( const Vec3< T > &  center,
radius 
) const

Returns TRUE if the sphere is fully contained within frustum. See also 'intersects'.

template<typename T >
bool cinder::Frustum< T >::contains ( const AxisAlignedBox3f box) const

Returns TRUE if the box is fully contained within frustum. See also 'intersects'.

template<typename T >
bool cinder::Frustum< T >::contains ( const Vec3< T > &  center,
const Vec3< T > &  size 
) const

Returns TRUE if the box is fully contained within frustum. See also 'intersects'.

template<typename T >
bool cinder::Frustum< T >::intersects ( const Vec3< T > &  loc) const

Returns TRUE if point is within frustum.

template<typename T >
bool cinder::Frustum< T >::intersects ( const Sphere sphere) const

Returns TRUE if the sphere is partially contained within frustum. See also 'contains'.

template<typename T >
bool cinder::Frustum< T >::intersects ( const Vec3< T > &  center,
radius 
) const

Returns TRUE if the sphere is partially contained within frustum. See also 'contains'.

template<typename T >
bool cinder::Frustum< T >::intersects ( const AxisAlignedBox3f box) const

Returns TRUE if the box is partially contained within frustum. See also 'contains'.

template<typename T >
bool cinder::Frustum< T >::intersects ( const Vec3< T > &  center,
const Vec3< T > &  size 
) const

Returns TRUE if the box is partially contained within frustum. See also 'contains'.

Member Data Documentation

template<typename T >
Plane<T> cinder::Frustum< T >::mFrustumPlanes[6]
protected

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