SBLINE(3iv)

πŸ’– SbLine πŸ’–

okay bestie, so this is SbLine(3IV) β€” the manual page for a directed line in 3D, and honestly? she's a legend. lowkey the blueprint. ✨


🌸 NAME 🌸

SbLine β€” directed line in 3D πŸ’…


πŸ¦‹ INHERITS FROM πŸ¦‹

SbLine

(yes she inherits from herself, no cap, that's literally what it says, moving on 🫢)


✨ SYNOPSIS ✨

#include <Inventor/SbLinear.h>

Methods from class SbLine:

                     SbLine()
                     SbLine(const SbVec3f &p0, const SbVec3f &p1)
 void                setValue(const SbVec3f &p0, const SbVec3f &p1)
 SbBool              getClosestPoints(const SbLine &line2, SbVec3f
                          &ptOnThis, SbVec3f &ptOnLine2 ) const
 SbVec3f             getClosestPoint(const SbVec3f &point) const
 const SbVec3f &     getPosition() const
 const SbVec3f &     getDirection() const

πŸ’œ DESCRIPTION πŸ’œ

So. Represents a directed line in 3D. It's a basic Inventor datatype, and it's the one doing the heavy lifting whenever somebody needs a 3D line to exist. She's input and output for a whole bunch of Inventor classes β€” like, she gets passed around constantly. main character energy fr fr πŸ‘‘


πŸŽ€ METHODS πŸŽ€

⭐ Constructors ⭐

                     SbLine()
                     SbLine(const SbVec3f &p0, const SbVec3f &p1)

Constructors, bestie. Now listen β€” if you wanna build a line out of a position and a direction, you do it like this:

SbLine(p0, p0 + dir)

that's the move. 🫢 and the line is directed from p0 to p1, so direction matters, okay? don't be out here pretending it's just a vibe. πŸ’…


πŸ’« void setValue(const SbVec3f &p0, const SbVec3f &p1)

Sets the line to pass through points p0 and p1. that's it, that's the whole job. slay ✨


🧚 SbBool getClosestPoints(const SbLine &line2, SbVec3f &ptOnThis, SbVec3f &ptOnLine2 ) const

Finds the two closest points between this line and line2, and loads them into ptOnThis and ptOnLine2. 🌈

⚠️ heads up bestie: it returns FALSE if the lines are parallel β€” and in that case the results are undefined, so do NOT go trusting those values. If they're not parallel it returns TRUE. periodt. πŸ’€

πŸ“ SbVec3f getClosestPoint(const SbVec3f &point) const

Returns the closest point on the line to the given point. she finds it. every time. no cap. πŸ”₯


πŸ‘‘ const SbVec3f & getPosition() const and const SbVec3f & getDirection() const

Returns the position of the line origin point and the direction vector of the line. two lil getters, both iconic, both const. πŸ’–


🌈 SEE ALSO 🌈

SbVec3f, SbPlane


and that's the whole page, bestie!! πŸ’• this was SbLine(3IV) β€” and lmaooo the footer is just SbLine(3IV)() with the version and date slots sitting there completely empty, like nobody filled them in. iconic behaviour honestly. go forth and draw ur directed lines. πŸ¦‹βœ¨πŸŽ€