Open Inventor Reference
SbLine Class Reference

Directed line in 3D. More...

#include <Inventor/SbLinear.h>

List of all members.

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 SbVec3fgetPosition () const
 Returns position of line origin point and direction vector of line.
const SbVec3fgetDirection () 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

Detailed 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. {}

See Also
SbVec3f, SbPlane

Definition at line 1177 of file SbLinear.h.


Constructor & Destructor Documentation

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.

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

To construct a line from a position and direction, use: SbLine(p0, p0 + dir). The line is directed from p0 to p1.


Member Function Documentation

SbVec3f SbLine::getClosestPoint ( const SbVec3f point) const
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 SbBox3f box 
) const
SbBool SbLine::intersect ( const SbBox3f box,
SbVec3f enter,
SbVec3f exit 
) const
SbBool SbLine::intersect ( float  angle,
const SbVec3f v0,
const SbVec3f v1,
SbVec3f pt 
) const
SbBool SbLine::intersect ( float  angle,
const SbVec3f point 
) const
SbBool SbLine::intersect ( const SbVec3f v0,
const SbVec3f v1,
const SbVec3f v2,
SbVec3f pt,
SbVec3f barycentric,
SbBool front 
) const
void SbLine::setValue ( const SbVec3f p0,
const SbVec3f p1 
)

The documentation for this class was generated from the following file: