.TH "SbPlane" 3 "Sat Oct 12 2013" "Version 4.0.0a" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SbPlane \- .PP The \fBSbPlane\fP class represents a plane in 3D space\&. .PP \fBSbPlane\fP 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\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBSbPlane\fP (void)" .br .ti -1c .RI "\fBSbPlane\fP (const \fBSbVec3f\fP &normal, const float D)" .br .ti -1c .RI "\fBSbPlane\fP (const \fBSbVec3f\fP &p0, const \fBSbVec3f\fP &p1, const \fBSbVec3f\fP &p2)" .br .ti -1c .RI "\fBSbPlane\fP (const \fBSbVec3f\fP &normal, const \fBSbVec3f\fP &point)" .br .ti -1c .RI "void \fBoffset\fP (const float d)" .br .ti -1c .RI "SbBool \fBintersect\fP (const \fBSbLine\fP &l, \fBSbVec3f\fP &intersection) const " .br .ti -1c .RI "void \fBtransform\fP (const \fBSbMatrix\fP &matrix)" .br .ti -1c .RI "SbBool \fBisInHalfSpace\fP (const \fBSbVec3f\fP &point) const " .br .ti -1c .RI "float \fBgetDistance\fP (const \fBSbVec3f\fP &point) const " .br .ti -1c .RI "const \fBSbVec3f\fP & \fBgetNormal\fP (void) const " .br .ti -1c .RI "float \fBgetDistanceFromOrigin\fP (void) const " .br .ti -1c .RI "void \fBprint\fP (FILE *file) const " .br .ti -1c .RI "SbBool \fBintersect\fP (const \fBSbPlane\fP &pl, \fBSbLine\fP &line) const " .br .in -1c .SS "Friends" .in +1c .ti -1c .RI "int \fBoperator==\fP (const \fBSbPlane\fP &p1, const \fBSbPlane\fP &p2)" .br .ti -1c .RI "int \fBoperator!=\fP (const \fBSbPlane\fP &p1, const \fBSbPlane\fP &p2)" .br .in -1c .SH "Detailed Description" .PP The \fBSbPlane\fP class represents a plane in 3D space\&. .PP \fBSbPlane\fP 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\&. .SH "Constructor & Destructor Documentation" .PP .SS "SbPlane::SbPlane (void)" An \fBSbPlane\fP instantiated with the default constructor will be uninitialized\&. .SS "SbPlane::SbPlane (const \fBSbVec3f\fP &normalref, const floatD)" Construct an \fBSbPlane\fP 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\&. .PP \fInormal\fP must not be a null vector\&. .SS "SbPlane::SbPlane (const \fBSbVec3f\fP &p0, const \fBSbVec3f\fP &p1, const \fBSbVec3f\fP &p2)" Construct an \fBSbPlane\fP with three points laying in the plane\&. Make sure \fIp0\fP, \fIp1\fP and \fIp2\fP are actually three distinct points, not on a line, when using this constructor\&. .SS "SbPlane::SbPlane (const \fBSbVec3f\fP &normalref, const \fBSbVec3f\fP &point)" Construct an \fBSbPlane\fP from a normal and a point laying in the plane\&. .PP \fInormal\fP must not be a null vector\&. .SH "Member Function Documentation" .PP .SS "void SbPlane::offset (const floatd)" Add the given offset \fId\fP to the plane distance from the origin\&. .SS "SbBool SbPlane::intersect (const \fBSbLine\fP &l, \fBSbVec3f\fP &intersection) const" Find the point on given line \fIl\fP intersecting the plane and return it in \fIintersection\fP\&. If the line is parallel to the plane, we return \fCFALSE\fP, otherwise \fCTRUE\fP\&. .PP Do not pass an invalid line for the \fIl\fP parameter (i\&.e\&. with a null direction vector)\&. .SS "void SbPlane::transform (const \fBSbMatrix\fP &matrix)" Transform the plane by \fImatrix\fP\&. .PP \fBSee Also:\fP .RS 4 \fBoffset()\fP .RE .PP .SS "SbBool SbPlane::isInHalfSpace (const \fBSbVec3f\fP &point) const" Check if the given point lies in the halfspace of the plane which the plane normal vector is pointing\&. .SS "float SbPlane::getDistance (const \fBSbVec3f\fP &point) const" Return the distance from \fIpoint\fP to plane\&. Positive distance means the point is in the plane's half space\&. .PP This method is an extension specific to Coin versus the original SGI Inventor API\&. .SS "const \fBSbVec3f\fP & SbPlane::getNormal (void) const" Return the plane's normal vector, which indicates which direction the plane is oriented\&. .PP \fBSee Also:\fP .RS 4 \fBgetDistanceFromOrigin()\fP\&. .RE .PP .SS "float SbPlane::getDistanceFromOrigin (void) const" Return distance from origin of coordinate system to the point in the plane which is closest to the origin\&. .PP \fBSee Also:\fP .RS 4 \fBgetNormal()\fP\&. .RE .PP .SS "void SbPlane::print (FILE *fp) const" Dump the state of this object to the \fIfile\fP stream\&. Only works in debug version of library, method does nothing in an optimized build\&. .SS "SbBool SbPlane::intersect (const \fBSbPlane\fP &pl, \fBSbLine\fP &line) const" Intersect this plane with \fIpl\fP, and return the resulting line in \fIline\fP\&. Returns \fCTRUE\fP if an intersection line can be found, and \fCFALSE\fP if the planes are parallel\&. .PP Please note that the resulting \fBSbLine\fP must be considered as a \fIline\fP intersecting the \fBSbLine\fP's origin, extending infinitely in both directions\&. .PP This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2\&.1 API\&. .PP \fBSince:\fP .RS 4 Coin 2\&.0 .RE .PP .SH "Friends And Related Function Documentation" .PP .SS "int operator== (const \fBSbPlane\fP &p1, const \fBSbPlane\fP &p2)\fC [friend]\fP" Check the two given planes for equality\&. .SS "int operator!= (const \fBSbPlane\fP &p1, const \fBSbPlane\fP &p2)\fC [friend]\fP" Check the two given planes for unequality\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.