#include <Inventor/SbLinear.h>
Public Methods | |
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) const |
SbVec3f | getClosestPoint (const SbVec3f &point) const |
const SbVec3f & | getPosition (void) const |
const SbVec3f & | getDirection (void) const |
void | print (FILE *file) const |
SbLine is used by many other classes in Coin. It provides a way of specifying a directed line through a specified point (origin) and a direction in 3D space. Note that the line is infinite in both directions from its definition point as far as the getClosestPoint() functions are concerned.
|
The empty constructor does nothing. The line will be uninitialized until the first assignment or setValue() call. |
|
Constructor with origin specifying the line origin point, and point specifying another point on the line that is used to determine the line's direction. point should not be the same as origin, as this will lead to the line having a null vector as the direction vector. This will cause division by zero problems in some of the other methods on this class. Be aware that the direction vector will be normalized and not be the same as point - origin.
|
|
Set new position and direction of the line by specifying line origin and another point on the line that is used to determine the line's direction. point should not be the same as origin, as this will lead to having a null vector as the direction vector. This will cause division by zero problems in some of the other methods on this class. Be aware that the direction vector will be normalized and not be the same as point - origin.
|
|
Returns the two closest points on the lines. If the lines are parallel, all points are equally close and we return
|
|
Returns the point on the line which is closest to point.
|
|
Return a vector representing the origin point on the line.
|
|
Return a vector representing the direction of the line. The direction vector will always be normalized. |
|
Dump the state of this object to the file stream. Only works in debug version of library, method does nothing in an optimized compile. |