Provided by: libcoin80-doc_3.1.4~abc9f50-4ubuntu2_all

**NAME**

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

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

**Constructor** **&** **Destructor** **Documentation**

SbPlane::SbPlane(void)AnSbPlaneinstantiated with the default constructor will be uninitialized.SbPlane::SbPlane(constSbVec3f&normalref,constfloatD)Construct anSbPlaneinstance 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.normalmust not be a null vector.SbPlane::SbPlane(constSbVec3f&p0,constSbVec3f&p1,constSbVec3f&p2)Construct anSbPlanewith three points laying in the plane. Make surep0,p1andp2are actually three distinct points, not on a line, when using this constructor.SbPlane::SbPlane(constSbVec3f&normalref,constSbVec3f&point)Construct anSbPlanefrom a normal and a point laying in the plane.normalmust not be a null vector.

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

voidSbPlane::offset(constfloatd)Add the given offsetdto the plane distance from the origin.SbBoolSbPlane::intersect(constSbLine&l,SbVec3f&intersection)constFind the point on given linelintersecting the plane and return it inintersection. If the line is parallel to the plane, we return FALSE, otherwise TRUE. Do not pass an invalid line for thelparameter (i.e. with a null direction vector).voidSbPlane::transform(constSbMatrix&matrix)Transform the plane bymatrix.SeeAlso:offset()SbBoolSbPlane::isInHalfSpace(constSbVec3f&point)constCheck if the given point lies in the halfspace of the plane which the plane normal vector is pointing.floatSbPlane::getDistance(constSbVec3f&point)constReturn the distance frompointto plane. Positive distance means the point is in the plane's half space. This method is an extension specific to Coin versus the original SGI Inventor API.constSbVec3f&SbPlane::getNormal(void)constReturn the plane's normal vector, which indicates which direction the plane is oriented.SeeAlso:getDistanceFromOrigin().floatSbPlane::getDistanceFromOrigin(void)constReturn distance from origin of coordinate system to the point in the plane which is closest to the origin.SeeAlso:getNormal().voidSbPlane::print(FILE*fp)constDump the state of this object to thefilestream. Only works in debug version of library, method does nothing in an optimized build.SbBoolSbPlane::intersect(constSbPlane&pl,SbLine&line)constIntersect this plane withpl, and return the resulting line inline. Returns TRUE if an intersection line can be found, and FALSE if the planes are parallel. Please note that the resultingSbLinemust be considered as alineintersecting theSbLine'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]Check the two given planes for equality.intoperator!=(constSbPlane&p1,constSbPlane&p2)[friend]Check the two given planes for unequality.

**Author**

Generated automatically by Doxygen for Coin from the source code.