SbDPLine(3)

πŸ“¦ version 3.1.3, in fedora 43, fedora 44

πŸ’… 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. p0 should not be the same as p1, 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: p0 should not be the same as p1, 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 ptOnThis and ptOnLine2, and we'll return TRUE. 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