Open Inventor Reference
|
Directed line in 3D. More...
#include <Inventor/SbLinear.h>
Public Member Functions | |
SbLine () | |
Constructors. | |
SbLine (const SbVec3f &p0, const SbVec3f &p1) | |
Constructors. | |
void | setValue (const SbVec3f &p0, const SbVec3f &p1) |
Sets line to pass through points p0 and p1 . | |
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 . | |
SbVec3f | getClosestPoint (const SbVec3f &point) const |
Returns the closest point on the line to the given point. | |
const SbVec3f & | getPosition () const |
Returns position of line origin point and direction vector of line. | |
const SbVec3f & | getDirection () const |
Returns position of line origin point and direction vector of line. | |
SbBool | intersect (const SbBox3f &box, SbVec3f &enter, SbVec3f &exit) const |
Intersect the line with a box, point, line, and triangle. | |
SbBool | intersect (float angle, const SbBox3f &box) const |
SbBool | intersect (float angle, const SbVec3f &point) const |
SbBool | intersect (float angle, const SbVec3f &v0, const SbVec3f &v1, SbVec3f &pt) const |
SbBool | intersect (const SbVec3f &v0, const SbVec3f &v1, const SbVec3f &v2, SbVec3f &pt, SbVec3f &barycentric, SbBool &front) const |
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. {}
Definition at line 1177 of file SbLinear.h.
SbLine::SbLine | ( | ) | [inline] |
To construct a line from a position and direction, use: SbLine(p0, p0 + dir)
. The line is directed from p0
to p1
.
Definition at line 1181 of file SbLinear.h.
To construct a line from a position and direction, use: SbLine(p0, p0 + dir)
. The line is directed from p0
to p1
.
SbBool SbLine::getClosestPoints | ( | const SbLine & | line2, |
SbVec3f & | ptOnThis, | ||
SbVec3f & | ptOnLine2 | ||
) | const |
Returns FALSE
if the lines are parallel (results undefined), and returns TRUE
otherwise.
const SbVec3f& SbLine::getDirection | ( | ) | const [inline] |
Definition at line 1204 of file SbLinear.h.
const SbVec3f& SbLine::getPosition | ( | ) | const [inline] |
Definition at line 1202 of file SbLinear.h.
SbBool SbLine::intersect | ( | float | angle, |
const SbVec3f & | v0, | ||
const SbVec3f & | v1, | ||
SbVec3f & | pt | ||
) | const |
SbBool SbLine::intersect | ( | const SbVec3f & | v0, |
const SbVec3f & | v1, | ||
const SbVec3f & | v2, | ||
SbVec3f & | pt, | ||
SbVec3f & | barycentric, | ||
SbBool & | front | ||
) | const |