Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SbPlane Class Reference

Oriented plane in 3D. More...

#include <Inventor/SbPlane.h>

Public Member Functions

 SbPlane ()
 Default constructor.
 
 SbPlane (const SbVec3f &p0, const SbVec3f &p1, const SbVec3f &p2)
 Constructor.
 
 SbPlane (const SbVec3f &normal, float distance)
 Constructor.
 
 SbPlane (const SbVec3f &normal, const SbVec3f &point)
 Constructor.
 
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.
 
const SbVec3fgetNormal () const
 Returns normal vector to plane.
 
float getDistanceFromOrigin () const
 Returns distance from origin to plane.
 
float getDistance (const SbVec3f &point) const
 Returns the distance from a point to plane.
 

Friends

int operator== (const SbPlane &p1, const SbPlane &p2)
 Equality comparison operator.
 
int operator!= (const SbPlane &p1, const SbPlane &p2)
 Inequality comparison operator.
 

Detailed Description

Oriented plane in 3D.

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

SEE ALSO

SbVec3f, SbLine

Definition at line 64 of file SbPlane.h.

Constructor & Destructor Documentation

◆ SbPlane() [1/4]

SbPlane::SbPlane ( )
inline

Default constructor.

The plane is not initialized.

Definition at line 69 of file SbPlane.h.

◆ SbPlane() [2/4]

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

Constructor.

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

◆ SbPlane() [3/4]

SbPlane::SbPlane ( const SbVec3f normal,
float  distance 
)

Constructor.

normal is a normal vector and distance is distance from origin to plane along normal vector.

◆ SbPlane() [4/4]

SbPlane::SbPlane ( const SbVec3f normal,
const SbVec3f point 
)

Constructor.

normal is a normal vector and point is a point in 3-space for the plane to pass through.

Member Function Documentation

◆ getDistance()

float SbPlane::getDistance ( const SbVec3f point) const

Returns the distance from a point to plane.

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

◆ getDistanceFromOrigin()

float SbPlane::getDistanceFromOrigin ( ) const
inline

Returns distance from origin to plane.

Definition at line 121 of file SbPlane.h.

◆ getNormal()

const SbVec3f & SbPlane::getNormal ( ) const
inline

Returns normal vector to plane.

Definition at line 117 of file SbPlane.h.

◆ intersect()

SbBool SbPlane::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.

◆ isInHalfSpace()

SbBool SbPlane::isInHalfSpace ( const SbVec3f point) const

Returns TRUE if the given point is within the half-space defined by the plane.

◆ offset()

void SbPlane::offset ( float  d)

Offset a plane by a given distance.

◆ transform()

void SbPlane::transform ( const SbMatrix matrix)

Transforms the plane by the given matrix.

Friends And Related Symbol Documentation

◆ operator!=

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

Inequality comparison operator.

Definition at line 130 of file SbPlane.h.

◆ operator==

int operator== ( const SbPlane p1,
const SbPlane p2 
)
friend

Equality comparison operator.


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