SbLine — directed line in 3D
Contents
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.
Inherits From
SbLine
Methods
SbLine()SbLine(constSbVec3f&p0,constSbVec3f&p1)
Constructors. To construct a line from a position and direction, use: SbLine(p0,p0+dir). The line
is directed from p0 to p1.
voidsetValue(constSbVec3f&p0,constSbVec3f&p1)
Sets line to pass through points p0 and p1.
SbBoolgetClosestPoints(constSbLine&line2,SbVec3f&ptOnThis,SbVec3f&ptOnLine2)const
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.
SbVec3fgetClosestPoint(constSbVec3f&point)const
Returns the closest point on the line to the given point.
constSbVec3f&getPosition()constconstSbVec3f&getDirection()const
Returns position of line origin point and direction vector of line.
Name
SbLine — directed line in 3D
See Also
SbVec3f,SbPlaneSbLine(3IV)()
Synopsis
#include<Inventor/SbLinear.h>
Methods from class SbLine:
SbLine()SbLine(constSbVec3f&p0,constSbVec3f&p1)voidsetValue(constSbVec3f&p0,constSbVec3f&p1)SbBoolgetClosestPoints(constSbLine&line2,SbVec3f&ptOnThis,SbVec3f&ptOnLine2)constSbVec3fgetClosestPoint(constSbVec3f&point)constconstSbVec3f&getPosition()constconstSbVec3f&getDirection()const