Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

SbPlane Class Reference

The SbPlane class represents a plane in 3D space. More...

#include <Inventor/SbLinear.h>

List of all members.

Public Methods

 SbPlane (void)
 SbPlane (const SbVec3f &normal, const float D)
 SbPlane (const SbVec3f &p0, const SbVec3f &p1, const SbVec3f &p2)
 SbPlane (const SbVec3f &normal, const SbVec3f &point)
void offset (const float d)
SbBool intersect (const SbLine &l, SbVec3f &intersection) const
void transform (const SbMatrix &matrix)
SbBool isInHalfSpace (const SbVec3f &point) const
float getDistance (const SbVec3f &point) const
const SbVec3fgetNormal (void) const
float getDistanceFromOrigin (void) const
void print (FILE *file) const

Friends

COIN_DLL_API int operator== (const SbPlane &p1, const SbPlane &p2)
COIN_DLL_API int operator!= (const SbPlane &p1, const SbPlane &p2)


Detailed Description

The SbPlane class represents a plane in 3D space.

SbPlane is used by many other classes in Coin. It provides a way of representing a plane, specified by a plane normal vector and a distance from the origin of the coordinate system.


Constructor & Destructor Documentation

SbPlane::SbPlane void
 

An SbPlane instantiated with the default constructor will have undefined behavior.

SbPlane::SbPlane const SbVec3f & normal,
const float D
 

Construct an SbPlane instance with a normal pointing in the given direction and the given shortest distance from the origin of the coordinate system to a point in the plane.

normal must not be a null vector.

SbPlane::SbPlane const SbVec3f & p0,
const SbVec3f & p1,
const SbVec3f & p2
 

Construct an SbPlane with three points lying in the plane. Make sure p0, p1 and p2 are actually three distinct points when using this constructor.

SbPlane::SbPlane const SbVec3f & normal,
const SbVec3f & point
 

Construct an SbPlane from a normal and a point lying in the plane.

normal must not be a null vector.


Member Function Documentation

void SbPlane::offset const float d
 

Add the given offset d to the plane distance from the origin.

SbBool SbPlane::intersect const SbLine & l,
SbVec3f & intersection
const
 

Find the point on given line l intersecting the plane and return it in intersection. If the line is parallel to the plane, we return FALSE, otherwise TRUE.

Do not pass an invalid line for the l parameter (i.e. with a null direction vector).

void SbPlane::transform const SbMatrix & matrix
 

Transform the plane by matrix.

See also:
offset()

SbBool SbPlane::isInHalfSpace const SbVec3f & point const
 

Check if the given point lies in the halfspace of the plane which the plane normal vector is pointing.

float SbPlane::getDistance const SbVec3f & point const
 

Return the distance from point to plane. Positive distance means the point is in the plane's half space.

This method is an extension specific to Coin versus the original SGI Inventor API.

const SbVec3f & SbPlane::getNormal void const
 

Return the plane's normal vector, which indicates which direction the plane is oriented.

See also:
getDistanceFromOrigin().

float SbPlane::getDistanceFromOrigin void const
 

Return distance from origin of coordinate system to the point in the plane which is closest to the origin.

See also:
getNormal().

void SbPlane::print FILE * fp const
 

Dump the state of this object to the file stream. Only works in debug version of library, method does nothing in an optimized compile.


Friends And Related Function Documentation

int operator== const SbPlane & p1,
const SbPlane & p2
[friend]
 

Check the two given planes for equality.

int operator!= const SbPlane & p1,
const SbPlane & p2
[friend]
 

Check the two given planes for unequality.


The documentation for this class was generated from the following files:
Generated at Tue Mar 5 03:31:28 2002 for Coin by doxygen1.2.9 written by Dimitri van Heesch, © 1997-2001