#include <Inventor/SbLinear.h>
Public Methods | |
| SbLine (void) | |
| 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 (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 (also known as a ray) through a specified point (origin) and a direction in 3D space. Note that the line is infinite in both directions from its definition point.
|
|
The empty constructor does nothing. The line will be uninitialized until the first assignment or setValue() call. |
|
||||||||||||
|
Constructor with p0 specifying the line start point and p1 the line end point. p0 should not be the same as p1, as this will lead 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. |
|
||||||||||||
|
Set new position and direction of the line by specifying line start point and end point. p0 should not be the same as p1, as this will lead 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. |
|
||||||||||||||||
|
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 a 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. |
1.2.12 written by Dimitri van Heesch,
© 1997-2001