SbPlane(3)
π SbPlane β the 3D-plane bestie π
okay so this is SbPlane(3), from the Coin library's Library Functions Manual, and she is literally the main character of 3D geometry. let's get into it π¦
β¨ NAME β¨
SbPlane β the SbPlane class represents a plane in 3D space. that's it, that's the girl. flat, infinite, iconic π
πΈ SYNOPSIS πΈ
#include <Inventor/SbLinear.h>
π Public Member Functions π
SbPlane (void)
SbPlane (const SbVec3f &normal, const float D)
SbPlane (const SbVec3f &p0, const SbVec3f &p1, const SbVec3f &p2)
SbPlane (const SbVec3f &normal, const SbVec3f &point)
void offset (const float d)
SbBool intersect (const SbLine &l, SbVec3f &intersection) const
void transform (const SbMatrix &matrix)
SbBool isInHalfSpace (const SbVec3f &point) const
float getDistance (const SbVec3f &point) const
const SbVec3f & getNormal (void) const
float getDistanceFromOrigin (void) const
void print (FILE *file) const
SbBool intersect (const SbPlane &pl, SbLine &line) const
π Detailed Description π
The SbPlane 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. (yes bestie, that typo is in the original, and we are respecting her. no cap.)
β οΈ heads up: be aware that this class is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API. so if you're out here on ancient SGI energy, she will simply not be there. π
Since Coin 2.0
SbPlane 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. (yes she said it twice. she's committed. we love consistency π«Ά)
π§ Constructor & Destructor Documentation π§
SbPlane::SbPlane (void )
An SbPlane instantiated with the default constructor will be uninitialized. so like, she exists, but she has no thoughts, no opinions, no normal vector. vibe check: failed on purpose. initialize her before you use her fr fr π
SbPlane::SbPlane (const SbVec3f & normalref, const float D)
Construct an SbPlane 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. that's a hard requirement, bestie, not a suggestion. π
SbPlane::SbPlane (const SbVec3f & p0, const SbVec3f & p1, const SbVec3f & p2)
Construct an SbPlane with three points laying in the plane. Make sure p0, p1 and p2 are actually three distinct points, not on a line, when using this constructor. like... three points that are all lined up do not a plane make. geometry said no. π
SbPlane::SbPlane (const SbVec3f & normalref, const SbVec3f & point)
Construct an SbPlane from a normal and a point laying in the plane.
normal must not be a null vector. again!! it's giving "the rules apply every time" β¨
π Member Function Documentation π
void SbPlane::offset (const float d)
Add the given offset d to the plane distance from the origin. slide her back and forth, she doesn't mind, she's infinite π«
SbBool SbPlane::intersect (const SbLine & l, SbVec3f & 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). seriously. don't. π«
void SbPlane::transform (const SbMatrix & matrix)
Transform the plane by matrix.
See also offset()
SbBool SbPlane::isInHalfSpace (const SbVec3f & point) const
Check if the given point lies in the halfspace of the plane which the plane normal vector is pointing. she's picking a side and she's committed to it π
float SbPlane::getDistance (const SbVec3f & point) const
Return the distance from point to 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.
const SbVec3f & SbPlane::getNormal (void ) const
Return the plane's normal vector, which indicates which direction the plane is oriented. she knows which way she's facing, always π₯
See also getDistanceFromOrigin().
float SbPlane::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().
void SbPlane::print (FILE * fp) const
Dump the state of this object to the file stream. Only works in debug version of library, method does nothing in an optimized build. so in a release build she's just out here doing absolutely nothing. silent. mysterious. π
SbBool SbPlane::intersect (const SbPlane & pl, SbLine & 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. (parallel planes? no intersection. they're giving avoidant attachment π)
Please note that the resulting SbLine must be considered as a line intersecting 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
π Author π
Generated automatically by Doxygen for Coin from the source code. (not a human, just a very diligent robot, slay π€β¨)
and that's the whole page bestie!! this beauty ships with Coin Version 3.1.3 β go make some planes, stay non-null, and never put three points on a line. periodt π ππ¦
π¦ where this page comes from
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.fc44 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.fc44 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms