- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# osg::Plane Class Reference

A plane class. More...

Inheritance diagram for osg::Plane:

[legend]
List of all members.

## Public Member Functions
| Plane ()
| Plane (const Plane &pl)
| Plane (float a, float b, float c, float d)
| Plane (const Vec4 &vec)
| Plane (const Vec3 &norm, float d)
| Plane (const Vec3 &v1, const Vec3 &v2, const Vec3 &v3)
Plane & | operator= (const Plane &pl)
void | set (const Plane &pl)
void | set (float a, float b, float c, float d)
void | set (const Vec4 &vec)
void | set (const Vec3 &norm, float d)
void | set (const Vec3 &v1, const Vec3 &v2, const Vec3 &v3)
void | set (const Vec3 &norm, const Vec3 &point)
void | flip ()
| flip/reverse the orientation of the plane.
void | makeUnitLength ()
void | calculateUpperLowerBBCorners ()
| calculate the upper and lower bounding box corners to be used in the intersect(BoundingBox&) method for speeding calculations.
bool | valid () const
bool | operator== (const Plane &plane) const
bool | operator!= (const Plane &plane) const
bool | operator< (const Plane &plane) const
float * | ptr ()
const float * | ptr () const
Vec4 & | asVec4 ()
const Vec4 & | asVec4 () const
float & | operator[] (unsigned int i)
float | operator[] (unsigned int i) const
osg::Vec3 | getNormal () const
float | distance (const osg::Vec3 &v) const
| calculate the distance between a point and the plane.
int | intersect (const std::vector< Vec3 > &vertices) const
| intersection test between plane and vertex list return 1 if the bs is completely above plane, return 0 if the bs intersects the plane, return -1 if the bs is completely below the plane.
int | intersect (const BoundingSphere &bs) const
| intersection test between plane and bounding sphere.
int | intersect (const BoundingBox &bb) const
| intersection test between plane and bounding sphere.
void | transform (const osg::Matrix &matrix)
| Transform the plane by matrix.
void | transformProvidingInverse (const osg::Matrix &matrix)
| Transform the plane by providing a pre inverted matrix.
## Protected Attributes
Vec4 | _fv
unsigned int | _upperBBCorner
unsigned int | _lowerBBCorner
## Friends
std::ostream & | operator<< (std::ostream &output, const Plane &pl)

## Detailed Description

A plane class.

It can be used to represent an infinite plane.

## Constructor & Destructor Documentation

osg::Plane::Plane | ( |  | ) | `[inline]`

osg::Plane::Plane | ( | const Plane & | pl | ) | `[inline]`

osg::Plane::Plane | ( | float | a,
|  | float | b,
|  | float | c,
|  | float | d
| ) | `[inline]`

osg::Plane::Plane | ( | const Vec4 & | vec | ) | `[inline]`

osg::Plane::Plane | ( | const Vec3 & | norm,
|  | float | d
| ) | `[inline]`

osg::Plane::Plane | ( | const Vec3 & | v1,
|  | const Vec3 & | v2,
|  | const Vec3 & | v3
| ) | `[inline]`

## Member Function Documentation

const Vec4& osg::Plane::asVec4 | ( |  | ) | const`[inline]`

Vec4& osg::Plane::asVec4 | ( |  | ) | `[inline]`

void osg::Plane::calculateUpperLowerBBCorners | ( |  | ) | `[inline]`

| calculate the upper and lower bounding box corners to be used in the intersect(BoundingBox&) method for speeding calculations.

float osg::Plane::distance | ( | const osg::Vec3 & | v | ) | const`[inline]`

| calculate the distance between a point and the plane.

void osg::Plane::flip | ( |  | ) | `[inline]`

| flip/reverse the orientation of the plane.

osg::Vec3 osg::Plane::getNormal | ( |  | ) | const`[inline]`

int osg::Plane::intersect | ( | const BoundingBox & | bb | ) | const`[inline]`

| intersection test between plane and bounding sphere. return 1 if the bs is completely above plane, return 0 if the bs intersects the plane, return -1 if the bs is completely below the plane.

int osg::Plane::intersect | ( | const BoundingSphere & | bs | ) | const`[inline]`

| intersection test between plane and bounding sphere. return 1 if the bs is completely above plane, return 0 if the bs intersects the plane, return -1 if the bs is completely below the plane.

int osg::Plane::intersect | ( | const std::vector< Vec3 > & | vertices | ) | const`[inline]`

| intersection test between plane and vertex list return 1 if the bs is completely above plane, return 0 if the bs intersects the plane, return -1 if the bs is completely below the plane.

void osg::Plane::makeUnitLength | ( |  | ) | `[inline]`

bool osg::Plane::operator!= | ( | const Plane & | plane | ) | const`[inline]`

bool osg::Plane::operator< | ( | const Plane & | plane | ) | const`[inline]`

Plane& osg::Plane::operator= | ( | const Plane & | pl | ) | `[inline]`

bool osg::Plane::operator== | ( | const Plane & | plane | ) | const`[inline]`

float osg::Plane::operator[] | ( | unsigned int | i | ) | const`[inline]`

float& osg::Plane::operator[] | ( | unsigned int | i | ) | `[inline]`

const float* osg::Plane::ptr | ( |  | ) | const`[inline]`

float* osg::Plane::ptr | ( |  | ) | `[inline]`

void osg::Plane::set | ( | const Vec3 & | norm,
|  | const Vec3 & | point
| ) | `[inline]`

void osg::Plane::set | ( | const Vec3 & | v1,
|  | const Vec3 & | v2,
|  | const Vec3 & | v3
| ) | `[inline]`

void osg::Plane::set | ( | const Vec3 & | norm,
|  | float | d
| ) | `[inline]`

void osg::Plane::set | ( | const Vec4 & | vec | ) | `[inline]`

void osg::Plane::set | ( | float | a,
|  | float | b,
|  | float | c,
|  | float | d
| ) | `[inline]`

void osg::Plane::set | ( | const Plane & | pl | ) | `[inline]`

void osg::Plane::transform | ( | const osg::Matrix & | matrix | ) | `[inline]`

| Transform the plane by matrix. Note, this operation carries out the calculation of the inverse of the matrix since a plane must be multiplied by the inverse transposed to transform it. This make this operation expensive. If the inverse has been already calculated elsewhere then use transformProvidingInverse() instead. See http://www.worldserver.com/turk/computergraphics/NormalTransformations.pdf

void osg::Plane::transformProvidingInverse | ( | const osg::Matrix & | matrix | ) | `[inline]`

| Transform the plane by providing a pre inverted matrix. see transform for details.

bool osg::Plane::valid | ( |  | ) | const`[inline]`

## Friends And Related Function Documentation

std::ostream& operator<< | ( | std::ostream & | output,
|  | const Plane & | pl
| ) | `[friend]`

## Member Data Documentation

Vec4 osg::Plane::_fv`[protected]`

unsigned int osg::Plane::_lowerBBCorner`[protected]`

unsigned int osg::Plane::_upperBBCorner`[protected]`

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

- Plane