SbLine(3)
π« SbLine β the SbLine(3) manual page, bestie edition π«
okay so real quick: this is from the Library Functions Manual, and it's literally all about the SbLine class. she's a 3D line. that's it. that's the girl. π
β¨ NAME β¨
SbLine β the SbLine class represents a line in 3D space. no cap, that's the whole job description. π
πΈ SYNOPSIS πΈ
#include <Inventor/SbLinear.h>
π¦ Public Member Functions
SbLine (void)SbLine (const SbVec3f &origin, const SbVec3f &point)void setValue (const SbVec3f &origin, const SbVec3f &point)SbBool getClosestPoints (const SbLine &line2, SbVec3f &ptOnThis, SbVec3f &ptOnLine2) constSbVec3f getClosestPoint (const SbVec3f &point) constconst SbVec3f & getPosition (void) constconst SbVec3f & getDirection (void) constvoid print (FILE *file) const
π Detailed Description π
so, the SbLine class represents a line in 3D space. iconic of her honestly.
SbLine gives you a way of specifying a directed line, through a 3D point (the origin) and a vector direction in 3D space. β¨
and here's the vibe check you need to pass: it is context dependent whether or not an SbLine counts as a ray β extending from the starting point in only one direction β or as a line that intersects the origin point and extends infinitely from it in both directions. so like... she contains multitudes. π«Ά
SbLine is used by many other classes in Coin. she's everywhere, she's booked and busy. π
π See also
SbVec3f
π§ Constructor & Destructor Documentation π§
π SbLine::SbLine (void )
the default constructor does nothing. like literally nothing. the line will be uninitialized until the first assignment or setValue() call. so don't come for her before she's ready bestie π
π SbLine::SbLine (const SbVec3f & origin, const SbVec3f & point)
constructor where origin specifies the line origin point, and point specifies another point on the line that is used to determine the line's direction.
β οΈpointshould not be the same asorigin, because that leads to the line having a null vector as the direction vector. and that will cause division by zero problems in some of the other methods on this class. so don't do it fr fr π
also be aware: the direction vector will be normalized and will not be the same as point - origin. she's been through the glow-up filter, okay?
π See also
setValue,getOrigin,getDirection
π₯ Member Function Documentation π₯
π void SbLine::setValue (const SbVec3f & origin, const SbVec3f & point)
set a new position and direction for the line by specifying the line origin and another point on the line that is used to determine the line's direction.
β οΈ same warning, same energy:pointshould not be the same asorigin, because that leads to having a null vector as the direction vector. and that will cause division by zero problems in some of the other methods on this class. ma'am please. π
be aware that the direction vector will be normalized and will not be the same as point - origin.
π See also
setValue,getOrigin,getDirection
β SbBool SbLine::getClosestPoints (const SbLine & line2, SbVec3f & ptOnThis, SbVec3f & 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. - if the lines are not parallel, the point positions will be stored in
ptOnThisandptOnLine2, and we'll returnTRUE. slay. β¨
note that both SbLine instances are considered to be infinite in both directions from their definition points, as far as this function is concerned. no endings, no edges, just vibes. π
π See also
getClosestPoint().
π SbVec3f SbLine::getClosestPoint (const SbVec3f & point) const
returns the point on the line which is closest to point:
_
Q D
SP x-----x------->
\ |
\ |
\ |
\ |
\|
x P
P = argument point _
SP = line starting point, and D = line direction of this line
Q = point to find and return from function
the vector defined by point and the returned point will be normal to the line. perpendicular queen. π
note that the SbLine instance is considered to be infinite in both directions from its definition point, as far as this function is concerned.
π See also
getClosestPoints().
π¦ const SbVec3f & SbLine::getPosition (void ) const
return a vector representing the origin point on the line.
π See also
setValue
πΈ const SbVec3f & SbLine::getDirection (void ) const
return a vector representing the direction of the line. the direction vector will always be normalized. always. periodt. π
π void SbLine::print (FILE * fp) const
dump the state of this object to the file stream.
β οΈ only works in the debug version of the library β this method does nothing in an optimized compile. so if you're getting silence, that's why bestie, it's not you π
π Author π
generated automatically by Doxygen for Coin from the source code. she didn't write herself, she was born this way. π§
and that's the whole page!! ty for coming to my ted talk π«Ά this was SbLine from Coin, Version 3.1.3, dated SbLine(3) β mwah, go build something cute with it πβ¨
π¦ 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