SbLine(3IV)NAMESbLine (SbLine) - directed line in 3D
INHERITS FROMSYNOPSIS
#include <Inventor_c/SbLinear.h>
Functions from class SbLine:
SbBool SbLineGetClosestPts(const SbLine *this, const SbLine
*line2, SbVec3f *ptOnThis, SbVec3f *ptOnLine2 )
SbVec3f SbLineGetClosestPt(const SbLine *this, const SbVec3f
*point)
DESCRIPTION
Represents a directed line in 3D. This is a basic Inventor datatype that
is used for representing a 3D line. It is used as input and output by a
variety of Inventor classes. Note that it does not have Create or Delete
functions. This is because is is a lightweight datatype that should be
declared or malloc'd as a standard C struct:
/* This is defined in Inventor_c/SbLinear.h: */
struct SbLine {
struct SbVec3f pos;
struct SbVec3f dir;
};
/* This is what your code should look like: */
SbLine line;
line.pos.vec[0] = 0.0;
line.pos.vec[1] = 0;
line.pos.vec[2] = 0.0;
SbV3fSetX_Y_Z( line.dir, 0, 1, 0 );
FUNCTIONS
SbBool SbLineGetClosestPts(const SbLine *this, const SbLine
*line2, SbVec3f *ptOnThis, SbVec3f *ptOnLine2 )
Finds the two closest points between this line and line2, and loads
them into ptOnThis and ptOnLine2. Returns FALSE if the lines are
parallel (results undefined), and returns TRUE otherwise.
SbVec3f SbLineGetClosestPt(const SbLine *this, const SbVec3f
*point)
Returns the closest point on the line to the given point.
Page 1SbLine(3IV)FILE FORMAT/DEFAULTS
Line {
}
Page 2