Coin  4.0.3
Coin3D core library
Loading...
Searching...
No Matches
SbDPPlane Class Reference

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

#include <Inventor/SbLinear.h>

Public Member Functions

 SbDPPlane (const SbVec3d &normal, const double D)
 
 SbDPPlane (const SbVec3d &normal, const SbVec3d &point)
 
 SbDPPlane (const SbVec3d &p0, const SbVec3d &p1, const SbVec3d &p2)
 
 SbDPPlane (void)
 
double getDistance (const SbVec3d &point) const
 
double getDistanceFromOrigin (void) const
 
const SbVec3dgetNormal (void) const
 
SbBool intersect (const SbDPLine &l, SbVec3d &intersection) const
 
SbBool intersect (const SbDPPlane &pl, SbDPLine &line) const
 
SbBool isInHalfSpace (const SbVec3d &point) const
 
void offset (const double d)
 
void print (FILE *file) const
 
void transform (const SbDPMatrix &matrix)
 

Related Symbols

(Note that these are not member symbols.)

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

Detailed Description

The SbDPPlane class represents a plane in 3D space.

SbDPPlane 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.

Be aware that this class is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API.

Since
Coin 2.0

Constructor & Destructor Documentation

◆ SbDPPlane() [1/4]

SbDPPlane::SbDPPlane ( void )

An SbDPPlane instantiated with the default constructor will be uninitialized.

◆ SbDPPlane() [2/4]

SbDPPlane::SbDPPlane ( const SbVec3d & normalref,
const double D )

Construct an SbDPPlane 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.

◆ SbDPPlane() [3/4]

SbDPPlane::SbDPPlane ( const SbVec3d & p0,
const SbVec3d & p1,
const SbVec3d & p2 )

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

◆ SbDPPlane() [4/4]

SbDPPlane::SbDPPlane ( const SbVec3d & normalref,
const SbVec3d & point )

Construct an SbDPPlane from a normal and a point laying in the plane.

normal must not be a null vector.

Member Function Documentation

◆ getDistance()

double SbDPPlane::getDistance ( const SbVec3d & point) const

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

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

◆ getDistanceFromOrigin()

double SbDPPlane::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().

◆ getNormal()

const SbVec3d & SbDPPlane::getNormal ( void ) const

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

See also
getDistanceFromOrigin().

◆ intersect() [1/2]

SbBool SbDPPlane::intersect ( const SbDPLine & l,
SbVec3d & 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).

◆ intersect() [2/2]

SbBool SbDPPlane::intersect ( const SbDPPlane & pl,
SbDPLine & line ) const

Intersect this plane with pl, and return the resulting line in line. Returns TRUE if an intersection line can be found, and FALSE if the planes are parallel.

This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API.

Since
Coin 2.0

◆ isInHalfSpace()

SbBool SbDPPlane::isInHalfSpace ( const SbVec3d & point) const

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

◆ offset()

void SbDPPlane::offset ( const double d)

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

◆ print()

void SbDPPlane::print ( FILE * fp) const

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

◆ transform()

void SbDPPlane::transform ( const SbDPMatrix & matrix)

Transform the plane by matrix.

See also
offset()

Friends And Related Symbol Documentation

◆ operator!=()

int operator!= ( const SbDPPlane & p1,
const SbDPPlane & p2 )
related

Check the two given planes for inequality.

◆ operator==()

int operator== ( const SbDPPlane & p1,
const SbDPPlane & p2 )
related

Check the two given planes for equality.


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