SbDPLine(3)
π 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) constSbVec3d getClosestPoint (const SbVec3d &point) constconst SbVec3d & getPosition (void) constconst SbVec3d & getDirection (void) constvoid 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. π
πp0should not be the same asp1, 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:p0should not be the same asp1, 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
- fedora 43: Coin4-devel 4.0.10-1.fc43 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 43: Coin4-devel 4.0.10-1.fc43 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 Β· BSD-3-Clause AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms