SbDPLine(3)
π SbDPLine β like, the whole vibe
okay bestie, welcome to the SbDPLine page from the Library Functions Manual (section 3, library functions, you know the drill). this is a Coin class, she's cute, she's a line in 3D space, and she's about to eat. π¦
β¨ NAME β¨
SbDPLine β The SbDPLine class represents a line in 3D space.
π SYNOPSIS π
Public Member Functions π
SbDPLine (void)
SbDPLine (const SbVec3d &p0, const SbVec3d &p1)
void setValue (const SbVec3d &p0, const SbVec3d &p1)
SbBool getClosestPoints (const SbDPLine &line2, SbVec3d &ptOnThis,
SbVec3d &ptOnLine2) const
SbVec3d getClosestPoint (const SbVec3d &point) const
const SbVec3d & getPosition (void) const
const SbVec3d & getDirection (void) const
void print (FILE *file) const
π Detailed Description π
The SbDPLine class represents a line in 3D space.
so SbDPLine is literally used by so many other classes in Coin, she's kind of a big deal. she gives you a way of specifying a directed line (also known as a ray, iykyk) through a specified point (the origin) and a direction in 3D space. β
heads up bestie: the line is infinite in both directions from its definition point. no cap, she goes on forever. π
Be aware that this class is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API. she's Coin-exclusive, periodt. π
See also
SbVec3d
Since
- Coin 2.0
π§ Constructor & Destructor Documentation π§
SbDPLine::SbDPLine (void ) π
The empty constructor does nothing. like, genuinely nothing. the line will be uninitialized until the first assignment or setValue() call. she's just vibing until you tell her who she is. π
SbDPLine::SbDPLine (const SbVec3d & p0, const SbVec3d & p1) π
Constructor with p0 specifying the line start point and p1 the line end point.
bestie listen.p0should not be the same asp1, because that will lead to having a null vector as the direction vector, which would cause division by zero problems in some of the other methods on this class. π do not do this to her.
β¨ Member Function Documentation β¨
void SbDPLine::setValue (const SbVec3d & p0, const SbVec3d & p1) πΈ
Set new position and direction of the line by specifying line start point and end point.
same warning, same energy:p0should not be the same asp1, as this will lead to having a null vector as the direction vector, which would cause division by zero problems in some of the other methods on this class. π
SbBool SbDPLine::getClosestPoints (const SbDPLine & line2, SbVec3d & ptOnThis, SbVec3d & ptOnLine2) const π«Ά
Returns the two closest points on the lines. here's the tea:
- if the lines are parallel, all points are equally close and we return
FALSE. no main character, sorry. - if the lines are not parallel, the point positions will be stored in
ptOnThisandptOnLine2, and we'll returnTRUE. slay. π₯
See also
getClosestPoint().
SbVec3d SbDPLine::getClosestPoint (const SbVec3d & point) const π
Returns the point on the line which is closest to point.
See also
getClosestPoints().
const SbVec3d & SbDPLine::getPosition (void ) const π
Return a vector representing a point on the line. that's it, that's the function. π
const SbVec3d & SbDPLine::getDirection (void ) const β
Return a vector representing the direction of the line. and ngl, the direction vector will always be normalized. she keeps herself put together like that. π
void SbDPLine::print (FILE * fp) const π¦
Dump the state of this object to the file stream.
lowkey important: this only works in the debug version of the library β the method does nothing in an optimized compile. π
π Author π
Generated automatically by Doxygen for Coin from the source code. (not a human, just a robot doing its little thing β¨)
and that's the whole page bestie!! π₯³ you now know everything about SbDPLine, she's iconic, she's infinite, and she will absolutely divide by zero if you give her p0 == p1. love that for her. π«Ά
π this was Coin, Version 3.1.3, SbDPLine(3) β bye bestie, go write some 3D lines!! π
π¦ 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