Open Inventor Reference
SbPlane Class Reference

Oriented plane in 3D. More...

#include <Inventor/SbLinear.h>

List of all members.

Public Member Functions

 SbPlane ()
 Default constructor.
 SbPlane (const SbVec3f &p0, const SbVec3f &p1, const SbVec3f &p2)
 Construct a plane given three points.
 SbPlane (const SbVec3f &n, float d)
 Construct a plane given normal and distance from origin along normal.
 SbPlane (const SbVec3f &n, const SbVec3f &p)
 Construct a plane given normal and a point to pass through Orientation is given by the normal vector n.
void offset (float d)
 Offset a plane by a given distance.
SbBool intersect (const SbLine &l, SbVec3f &intersection) const
 Intersect line and plane, returning TRUE if there is an intersection, FALSE if line is parallel to plane.
void transform (const SbMatrix &matrix)
 Transforms the plane by the given matrix.
SbBool isInHalfSpace (const SbVec3f &point) const
 Returns TRUE if the given point is within the half-space defined by the plane.
float getDistance (const SbVec3f &point) const
 Returns the distance of the point to the plane.
const SbVec3fgetNormal () const
 Returns normal vector to plane.
float getDistanceFromOrigin () const
 Returns distance from origin to plane.

Friends

INVENTOR_API int operator== (const SbPlane &p1, const SbPlane &p2)
 Equality/inequality comparison operators.
INVENTOR_API int operator!= (const SbPlane &p1, const SbPlane &p2)

Detailed Description

Represents an oriented plane in 3D. This is a lightweight class/datatype that is used for arguments to some Inventor objects. {}

See Also
SbVec3f, SbLine

Definition at line 1245 of file SbLinear.h.


Constructor & Destructor Documentation

SbPlane::SbPlane ( ) [inline]

Definition at line 1248 of file SbLinear.h.

SbPlane::SbPlane ( const SbVec3f p0,
const SbVec3f p1,
const SbVec3f p2 
)

p0, p1, and p2 represent three points in the plane.

SbPlane::SbPlane ( const SbVec3f n,
float  d 
)

Orientation is given by the normal vector n.

SbPlane::SbPlane ( const SbVec3f n,
const SbVec3f p 
)

Member Function Documentation

float SbPlane::getDistance ( const SbVec3f point) const
float SbPlane::getDistanceFromOrigin ( ) const [inline]

Definition at line 1283 of file SbLinear.h.

const SbVec3f& SbPlane::getNormal ( ) const [inline]

Definition at line 1281 of file SbLinear.h.

SbBool SbPlane::intersect ( const SbLine l,
SbVec3f intersection 
) const
SbBool SbPlane::isInHalfSpace ( const SbVec3f point) const
void SbPlane::offset ( float  d)
void SbPlane::transform ( const SbMatrix matrix)

Friends And Related Function Documentation

INVENTOR_API int operator!= ( const SbPlane p1,
const SbPlane p2 
) [friend]

Definition at line 1287 of file SbLinear.h.

INVENTOR_API int operator== ( const SbPlane p1,
const SbPlane p2 
) [friend]

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