.TH "SbDPLine" 3 "Tue Dec 26 2023 17:59:22" "Version 4.0.2" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SbDPLine \- The \fBSbDPLine\fP class represents a line using double precision coordinates\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBSbDPLine\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBSbDPLine\fP (\fBconst\fP \fBSbVec3d\fP &\fBp0\fP, \fBconst\fP \fBSbVec3d\fP &\fBp1\fP)" .br .ti -1c .RI "\fBvoid\fP \fBsetValue\fP (\fBconst\fP \fBSbVec3d\fP &\fBp0\fP, \fBconst\fP \fBSbVec3d\fP &\fBp1\fP)" .br .ti -1c .RI "\fBvoid\fP \fBsetPosDir\fP (\fBconst\fP \fBSbVec3d\fP &position, \fBconst\fP \fBSbVec3d\fP &direction)" .br .ti -1c .RI "SbBool \fBgetClosestPoints\fP (\fBconst\fP \fBSbDPLine\fP &\fBline2\fP, \fBSbVec3d\fP &\fBptOnThis\fP, \fBSbVec3d\fP &\fBptOnLine2\fP) \fBconst\fP" .br .ti -1c .RI "\fBSbVec3d\fP \fBgetClosestPoint\fP (\fBconst\fP \fBSbVec3d\fP &point) \fBconst\fP" .br .ti -1c .RI "\fBconst\fP \fBSbVec3d\fP & \fBgetPosition\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBconst\fP \fBSbVec3d\fP & \fBgetDirection\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBprint\fP (\fBFILE\fP *\fBfile\fP) \fBconst\fP" .br .in -1c .SH "Detailed Description" .PP The \fBSbDPLine\fP class represents a line using double precision coordinates\&. \fBSbDPLine\fP 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\&. .PP Be aware that this class is an extension for Coin, and it is not available in the original SGI Open Inventor \fBv2\&.1\fP API\&. .br .PP \fBSee also\fP .RS 4 \fBSbVec3d\fP .RE .PP \fBSince\fP .RS 4 Coin \fB2\&.0\fP .RE .PP .SH "Constructor & Destructor Documentation" .PP .SS "SbDPLine::SbDPLine (\fBvoid\fP)" The empty constructor does nothing\&. The line will be uninitialized until the first assignment or \fBsetValue()\fP call\&. .SS "SbDPLine::SbDPLine (\fBconst\fP \fBSbVec3d\fP & p0, \fBconst\fP \fBSbVec3d\fP & p1)" Constructor with \fIp0\fP specifying the line start point and \fIp1\fP the line end point\&. \fIp0\fP should not be the same as \fIp1\fP, 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\&. .SH "Member Function Documentation" .PP .SS "\fBvoid\fP SbDPLine::setValue (\fBconst\fP \fBSbVec3d\fP & p0, \fBconst\fP \fBSbVec3d\fP & p1)" Set new position and direction of the line by specifying line start point and end point\&. \fIp0\fP should not be the same as \fIp1\fP, 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\&. .SS "\fBvoid\fP SbDPLine::setPosDir (\fBconst\fP \fBSbVec3d\fP & position, \fBconst\fP \fBSbVec3d\fP & direction)" Set position and direction\&. .PP Be aware that the direction vector will be normalized and not be the same as provided to this method\&. .PP \fBSee also\fP .RS 4 \fBsetValue\fP, getOrigin, \fBgetDirection\fP .RE .PP \fBSince\fP .RS 4 Coin \fB4\&.0\fP .RE .PP .SS "SbBool SbDPLine::getClosestPoints (\fBconst\fP \fBSbDPLine\fP & line2, \fBSbVec3d\fP & ptOnThis, \fBSbVec3d\fP & ptOnLine2) const" Returns the two closest points on the lines\&. If the lines are parallel, all points are equally close and we return \fCFALSE\fP\&. If the lines are not parallel, the point positions will be stored in \fIptOnThis\fP and \fIptOnLine2\fP, and we'll return \fCTRUE\fP\&. .PP \fBSee also\fP .RS 4 \fBgetClosestPoint()\fP\&. .RE .PP .SS "\fBSbVec3d\fP SbDPLine::getClosestPoint (\fBconst\fP \fBSbVec3d\fP & point) const" Returns the point on the line which is closest to \fIpoint\fP\&. .PP \fBSee also\fP .RS 4 \fBgetClosestPoints()\fP\&. .RE .PP .SS "\fBconst\fP \fBSbVec3d\fP & SbDPLine::getPosition (\fBvoid\fP) const" Return a vector representing a point on the line\&. .SS "\fBconst\fP \fBSbVec3d\fP & SbDPLine::getDirection (\fBvoid\fP) const" Return a vector representing the direction of the line\&. The direction vector will always be normalized\&. .SS "\fBvoid\fP SbDPLine::print (\fBFILE\fP * fp) const" Dump the state of this object to the \fIfp\fP file stream\&. Only works in debug version of library, method does nothing in an optimized build\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.