Om
1.0.0
A universal framework for multimedia simulation
|
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 Plane3 & | getNearPlane () 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 Plane3 & | getFarPlane () 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 Plane3 & | getLeftPlane () 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 Plane3 & | getRightPlane () 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 Plane3 & | getTopPlane () 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 Plane3 & | getBottomPlane () 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... | |
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.
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.
Return whether or not the specified point is contained by this view volume.
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.
Return whether or not the specified point is contained by this view volume.
|
inline |
Get the near clipping plane of this view volume.
|
inline |
Set the near clipping plane of this view volume.
|
inline |
Get the far clipping plane of this view volume.
|
inline |
Set the far clipping plane of this view volume.
|
inline |
Get the left clipping plane of this view volume.
|
inline |
Set the left clipping plane of this view volume.
|
inline |
Get the right clipping plane of this view volume.
|
inline |
Set the right clipping plane of this view volume.
|
inline |
Get the top clipping plane of this view volume.
|
inline |
Set the top clipping plane of this view volume.
|
inline |
Get the bottom clipping plane of this view volume.
|
inline |
Set the bottom clipping plane of this view volume.
|
static |
The return value for an intersection routine when an object is completely inside the view volume.
|
static |
The return value for an intersection routine when an object intersects the boundary of the view volume.
|
static |
The return value for an intersection routine when an object is outside of the view volume.