SbPlane Class Reference
[Basics]

Oriented plane in 3D. More...

#include <Inventor/SbPlane.h>

List of all members.

Public Member Functions

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

Friends

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

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


Constructor & Destructor Documentation

SbPlane::SbPlane (  )  [inline]

Default constructor.

The plane is not initialized.

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

Constructor.

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

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::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

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.

float SbPlane::getDistanceFromOrigin (  )  const [inline]

Returns distance from origin to plane.

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

Returns normal vector to plane.

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.

SbBool SbPlane::isInHalfSpace ( const SbVec3f point  )  const

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

void SbPlane::offset ( float  d  ) 

Offset a plane by a given distance.

void SbPlane::transform ( const SbMatrix matrix  ) 

Transforms the plane by the given matrix.


Friends And Related Function Documentation

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

Inequality comparison operator.

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

Equality comparison operator.


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

Open Inventor Toolkit reference manual, generated on 12 Feb 2024
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/