Provided by: libcoin60-doc_3.1.3-2_all

**NAME**

SbPlane - TheSbPlaneclass 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.

**SYNOPSIS**

#include <Inventor/SbLinear.h>PublicMemberFunctionsSbPlane(void)SbPlane(constSbVec3f&normal, const float D)SbPlane(constSbVec3f&p0, constSbVec3f&p1, constSbVec3f&p2)SbPlane(constSbVec3f&normal, constSbVec3f&point) voidoffset(const float d) SbBoolintersect(constSbLine&l,SbVec3f&intersection) const voidtransform(constSbMatrix&matrix) SbBoolisInHalfSpace(constSbVec3f&point) const floatgetDistance(constSbVec3f&point) const constSbVec3f&getNormal(void) const floatgetDistanceFromOrigin(void) const voidintersect(constSbPlane&pl,SbLine&line) constFriendsintoperator==(constSbPlane&p1, constSbPlane&p2) intoperator!=(constSbPlane&p1, constSbPlane&p2)

**Detailed** **Description**

TheSbPlaneclass 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. TheSbPlaneclass represents a plane in 3D space.SbPlaneis 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**

SbPlane::SbPlane(void)AnSbPlaneinstantiatedwiththedefaultconstructorwillbeuninitialized.SbPlane::SbPlane(constSbVec3f&normalref,constfloatD)ConstructanSbPlaneinstancewithanormalpointinginthegivendirectionandthegivenshortestdistancefromtheoriginofthecoordinatesystemtoapointintheplane.normalmust not be a null vector.SbPlane::SbPlane(constSbVec3f&p0,constSbVec3f&p1,constSbVec3f&p2)ConstructanSbPlanewiththreepointslayingintheplane.Makesurep0,p1andp2areactuallythreedistinctpoints,notonaline,whenusingthisconstructor.SbPlane::SbPlane(constSbVec3f&normalref,constSbVec3f&point)ConstructanSbPlanefromanormalandapointlayingintheplane.normalmust not be a null vector.

**Member** **Function** **Documentation**

voidSbPlane::offset(constfloatd)Addthegivenoffsetdtotheplanedistancefromtheorigin.SbBoolSbPlane::intersect(constSbLine&l,SbVec3f&intersection)constFindthepointongivenlinelintersectingtheplaneandreturnitinintersection.Ifthelineisparalleltotheplane,wereturnFALSE,otherwiseTRUE.Do not pass an invalid line for thelparameter (i.e. with a null direction vector).voidSbPlane::transform(constSbMatrix&matrix)Transformtheplanebymatrix.Seealso:offset()SbBoolSbPlane::isInHalfSpace(constSbVec3f&point)constCheckifthegivenpointliesinthehalfspaceoftheplanewhichtheplanenormalvectorispointing.floatSbPlane::getDistance(constSbVec3f&point)constReturnthedistancefrompointtoplane.Positivedistancemeansthepointisintheplane'shalfspace.This method is an extension specific to Coin versus the original SGI Inventor API.constSbVec3f&SbPlane::getNormal(void)constReturntheplane'snormalvector,whichindicateswhichdirectiontheplaneisoriented.Seealso:getDistanceFromOrigin().floatSbPlane::getDistanceFromOrigin(void)constReturndistancefromoriginofcoordinatesystemtothepointintheplanewhichisclosesttotheorigin.Seealso:getNormal().voidSbPlane::print(FILE*fp)constDumpthestateofthisobjecttothefilestream.Onlyworksindebugversionoflibrary,methoddoesnothinginanoptimizedbuild.SbBoolSbPlane::intersect(constSbPlane&pl,SbLine&line)constIntersectthisplanewithpl,andreturntheresultinglineinline.ReturnsTRUEifanintersectionlinecanbefound,andFALSEiftheplanesareparallel.Please note that the resultingSbLinemust be considered as alineintersecting the SbLine's origin, extending infinitely in both directions. 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

**Friends** **And** **Related** **Function** **Documentation**

intoperator==(constSbPlane&p1,constSbPlane&p2)[friend]Checkthetwogivenplanesforequality.intoperator!=(constSbPlane&p1,constSbPlane&p2)[friend]Checkthetwogivenplanesforunequality.

**Author**

Generated automatically by Doxygen for Coin from the source code.