Open Inventor Reference
SbPlane Class Reference

Oriented plane in 3D. More...

#include <Inventor/SbLinear.h>

Public Member Functions

 SbPlane ()
 Default constructor. More...
 
 SbPlane (const SbVec3f &p0, const SbVec3f &p1, const SbVec3f &p2)
 Construct a plane given three points. More...
 
 SbPlane (const SbVec3f &n, float d)
 Construct a plane given normal and distance from origin along normal. More...
 
 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. More...
 
void offset (float d)
 Offset a plane by a given distance. More...
 
bool 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. More...
 
void transform (const SbMatrix &matrix)
 Transforms the plane by the given matrix. More...
 
bool isInHalfSpace (const SbVec3f &point) const
 Returns TRUE if the given point is within the half-space defined by the plane. More...
 
float getDistance (const SbVec3f &point) const
 Returns the distance of the point to the plane. More...
 
const SbVec3fgetNormal () const
 Returns normal vector to plane. More...
 
float getDistanceFromOrigin () const
 Returns distance from origin to plane. More...
 

Friends

INVENTOR_API bool operator== (const SbPlane &p1, const SbPlane &p2)
 Equality/inequality comparison operators. More...
 
INVENTOR_API bool 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 1360 of file SbLinear.h.

Constructor & Destructor Documentation

◆ SbPlane() [1/4]

SbPlane::SbPlane ( )
inline

Definition at line 1363 of file SbLinear.h.

◆ SbPlane() [2/4]

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

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

◆ SbPlane() [3/4]

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

Orientation is given by the normal vector n.

◆ SbPlane() [4/4]

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

Member Function Documentation

◆ getDistance()

float SbPlane::getDistance ( const SbVec3f point) const

◆ getDistanceFromOrigin()

float SbPlane::getDistanceFromOrigin ( ) const
inline

Definition at line 1398 of file SbLinear.h.

◆ getNormal()

const SbVec3f& SbPlane::getNormal ( ) const
inline

Definition at line 1396 of file SbLinear.h.

◆ intersect()

bool SbPlane::intersect ( const SbLine l,
SbVec3f intersection 
) const

◆ isInHalfSpace()

bool SbPlane::isInHalfSpace ( const SbVec3f point) const

◆ offset()

void SbPlane::offset ( float  d)

◆ transform()

void SbPlane::transform ( const SbMatrix matrix)

Friends And Related Function Documentation

◆ operator!=

INVENTOR_API bool operator!= ( const SbPlane p1,
const SbPlane p2 
)
friend

Definition at line 1416 of file SbLinear.h.

◆ operator==

INVENTOR_API bool operator== ( const SbPlane p1,
const SbPlane p2 
)
friend

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