Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | Static Public Attributes | List of all members
om::graphics::base::ViewVolume Class Reference

A class that represents a visible region of space. More...

#include <omGraphicsViewVolume.h>

Public Member Functions

 ViewVolume (const Plane3 &newNear, const Plane3 &newFar, const Plane3 &newLeft, const Plane3 &newRight, const Plane3 &newTop, const Plane3 &newBottom)
 Create a view volume with the specified bounding planes. More...
 
Bool intersects (const Vector3 &point) const
 Return whether or not the specified point is contained by this view volume. More...
 
Bool intersects (const Sphere3 &sphere) const
 Return whether or not the specified bounding sphere intersects this view volume. More...
 
Bool intersects (const BoundingCone &cone) const
 Return whether or not the specified bounding cone intersects this view volume. More...
 
UInt intersects (const AABB3 &box) const
 Return whether or not the specified point is contained by this view volume. More...
 
const Plane3getNearPlane () const
 Get the near clipping plane of this view volume. More...
 
void setNearPlane (const Plane3 &newNear)
 Set the near clipping plane of this view volume. More...
 
const Plane3getFarPlane () const
 Get the far clipping plane of this view volume. More...
 
void setFarPlane (const Plane3 &newFar)
 Set the far clipping plane of this view volume. More...
 
const Plane3getLeftPlane () const
 Get the left clipping plane of this view volume. More...
 
void setLeftPlane (const Plane3 &newLeft)
 Set the left clipping plane of this view volume. More...
 
const Plane3getRightPlane () const
 Get the right clipping plane of this view volume. More...
 
void setRightPlane (const Plane3 &newRight)
 Set the right clipping plane of this view volume. More...
 
const Plane3getTopPlane () const
 Get the top clipping plane of this view volume. More...
 
void setTopPlane (const Plane3 &newTop)
 Set the top clipping plane of this view volume. More...
 
const Plane3getBottomPlane () const
 Get the bottom clipping plane of this view volume. More...
 
void setBottomPlane (const Plane3 &newBottom)
 Set the bottom clipping plane of this view volume. More...
 

Static Public Attributes

static const UInt INSIDE = 2
 The return value for an intersection routine when an object is completely inside the view volume. More...
 
static const UInt INTERSECTS = 1
 The return value for an intersection routine when an object intersects the boundary of the view volume. More...
 
static const UInt OUTSIDE = 0
 The return value for an intersection routine when an object is outside of the view volume. More...
 

Detailed Description

A class that represents a visible region of space.

A ViewVolume is specified as the intersection of the half-spaces defined by six viewing planes. Typically, these planes will represent the six sides of a canonical viewing frustum.

This class provides methods to determine whether or not a view volume contains any part of several types of geometric primitives: points, spheres, cones, and axis-aligned bounding boxes.

Constructor & Destructor Documentation

om::graphics::base::ViewVolume::ViewVolume ( const Plane3 newNear,
const Plane3 newFar,
const Plane3 newLeft,
const Plane3 newRight,
const Plane3 newTop,
const Plane3 newBottom 
)

Create a view volume with the specified bounding planes.

By convention, the normals of all planes should point towards the interior of the view volume.

Member Function Documentation

Bool om::graphics::base::ViewVolume::intersects ( const Vector3 point) const
inline

Return whether or not the specified point is contained by this view volume.

Bool om::graphics::base::ViewVolume::intersects ( const Sphere3 sphere) const
inline

Return whether or not the specified bounding sphere intersects this view volume.

Bool om::graphics::base::ViewVolume::intersects ( const BoundingCone cone) const

Return whether or not the specified bounding cone intersects this view volume.

UInt om::graphics::base::ViewVolume::intersects ( const AABB3 box) const

Return whether or not the specified point is contained by this view volume.

const Plane3& om::graphics::base::ViewVolume::getNearPlane ( ) const
inline

Get the near clipping plane of this view volume.

void om::graphics::base::ViewVolume::setNearPlane ( const Plane3 newNear)
inline

Set the near clipping plane of this view volume.

const Plane3& om::graphics::base::ViewVolume::getFarPlane ( ) const
inline

Get the far clipping plane of this view volume.

void om::graphics::base::ViewVolume::setFarPlane ( const Plane3 newFar)
inline

Set the far clipping plane of this view volume.

const Plane3& om::graphics::base::ViewVolume::getLeftPlane ( ) const
inline

Get the left clipping plane of this view volume.

void om::graphics::base::ViewVolume::setLeftPlane ( const Plane3 newLeft)
inline

Set the left clipping plane of this view volume.

const Plane3& om::graphics::base::ViewVolume::getRightPlane ( ) const
inline

Get the right clipping plane of this view volume.

void om::graphics::base::ViewVolume::setRightPlane ( const Plane3 newRight)
inline

Set the right clipping plane of this view volume.

const Plane3& om::graphics::base::ViewVolume::getTopPlane ( ) const
inline

Get the top clipping plane of this view volume.

void om::graphics::base::ViewVolume::setTopPlane ( const Plane3 newTop)
inline

Set the top clipping plane of this view volume.

const Plane3& om::graphics::base::ViewVolume::getBottomPlane ( ) const
inline

Get the bottom clipping plane of this view volume.

void om::graphics::base::ViewVolume::setBottomPlane ( const Plane3 newBottom)
inline

Set the bottom clipping plane of this view volume.

Member Data Documentation

const UInt om::graphics::base::ViewVolume::INSIDE = 2
static

The return value for an intersection routine when an object is completely inside the view volume.

const UInt om::graphics::base::ViewVolume::INTERSECTS = 1
static

The return value for an intersection routine when an object intersects the boundary of the view volume.

const UInt om::graphics::base::ViewVolume::OUTSIDE = 0
static

The return value for an intersection routine when an object is outside of the view volume.


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