SbDPLine(3)

πŸ“¦
version 4.0.10 Β· 4 versions
, in fedora 43, fedora 44

πŸ’… SbDPLine πŸ’…

okay bestie, welcome to page 3 of the Coin manual β€” this one's about SbDPLine, and it's lowkey one of the most useful little geometry girlies in the whole library. let's get into it ✨


🌸 NAME 🌸

SbDPLine β€” the class that represents a line using double precision coordinates. that's it, that's the vibe. πŸ’–


✨ SYNOPSIS ✨

#include <Inventor/SbDPLine.h>

πŸŽ€ Public Member Functions πŸŽ€

  • SbDPLine (void)
  • SbDPLine (const SbVec3d &p0, const SbVec3d &p1)
  • void setValue (const SbVec3d &p0, const SbVec3d &p1)
  • void setPosDir (const SbVec3d &position, const SbVec3d &direction)
  • 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 using double precision coordinates. iconic behavior honestly 🌈

SbDPLine is used by so many other classes in Coin. it gives you a way of specifying a directed line (also known as a ray) through a specified point (the origin) and a direction in 3D space. and here's the part you gotta internalize, bestie: note that the line is infinite in both directions from its definition point. like, she goes on forever. no cap. ♾️

🫢 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 porting ancient code, that's your heads-up.

See also

  • SbVec3d

Since

  • Coin 2.0

πŸ’– Constructor & Destructor Documentation πŸ’–

🌸 SbDPLine::SbDPLine (void )

The empty constructor does nothing. like literally nothing, she's just vibing. The line will be uninitialized until the first assignment or setValue() call. so don't come for her before you've set her up, okay? 😭

🌸 SbDPLine::SbDPLine (const SbVec3d & p0, const SbVec3d & p1)

Constructor with p0 specifying the line start point and p1 the line end point. πŸ“

πŸ’€ p0 should not be the same as p1, because that leads 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. not the chaos we want, bestie.

πŸ’… Member Function Documentation πŸ’…

⭐ void SbDPLine::setValue (const SbVec3d & p0, const SbVec3d & p1)

Set new position and direction of the line by specifying the line start point and end point. simple, clean, slay. ✨

πŸ’€ again: p0 should not be the same as p1, since that leads to a null vector as the direction vector, which would cause division by zero problems in some of the other methods on this class. same warning, same energy, don't do it.

⭐ void SbDPLine::setPosDir (const SbVec3d & position, const SbVec3d & direction)

Set position and direction. πŸ“

🫢 heads up: the direction vector will be normalized and will not be the same as what you passed into this method. she gets a glow-up on the way in, periodt.

See also

  • setValue, getOrigin, getDirection

Since

  • Coin 4.0

⭐ SbBool SbDPLine::getClosestPoints (const SbDPLine & line2, SbVec3d & ptOnThis, SbVec3d & ptOnLine2) const

Returns the two closest points on the lines. πŸ«‚

If the lines are parallel, all points are equally close and we return FALSE. If the lines are not parallel, the point positions will be stored in ptOnThis and ptOnLine2, and we'll return TRUE. so the return value is literally telling you which timeline you're in. 😌

See also

  • getClosestPoint().

⭐ SbVec3d SbDPLine::getClosestPoint (const SbVec3d & point) const

Returns the point on the line which is closest to point. that's it, she finds the nearest spot on the line for you. πŸ’–

See also

  • getClosestPoints().

⭐ const SbVec3d & SbDPLine::getPosition (void ) const

Return a vector representing a point on the line. πŸ“

⭐ const SbVec3d & SbDPLine::getDirection (void ) const

Return a vector representing the direction of the line. and bestie, the direction vector will always be normalized. always. no exceptions. 🌈

⭐ void SbDPLine::print (FILE * fp) const

Dump the state of this object to the fp file stream. πŸ–¨οΈ

πŸ™ˆ only works in the debug version of the library β€” this method does nothing in an optimized build. so if you're printing and getting silence, that's why, don't panic.

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for Coin from the source code. πŸ€– (she's a bot, but she ate)


and that's the whole page, bestie β€” thanks for reading all the way to the bottom, you're literally the main character. πŸ’–βœ¨πŸŽ€πŸ¦‹

Version 4.0.10 Β· Thu Jun 25 2026 00:00:00 Β· SbDPLine(3) β€” mwah, go build something gorgeous with your infinite ray πŸ«ΆπŸ‘‘

πŸ“¦ where this page comes from