SbLine - Online Linux Manual PageSection : 3
Updated : Mon Jan 25 2021
Source : Version 4.0.0
Note : Coin
NAMESbLine − The SbLine class represents a line in 3D space.
SYNOPSIS
#include <Inventor/SbLine.h>
Public Member FunctionsSbLine (void)
SbLine (const SbVec3f &origin, const SbVec3f &point)
void setValue (const SbVec3f &origin, const SbVec3f &point)
void setPosDir (const SbVec3f &position, const SbVec3f &direction)
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
Detailed DescriptionThe SbLine class represents a line in 3D space. SbLine provides a way of specifying a directed line, through a 3D point (origin) and a vector direction in 3D space. It is context dependent whether or not an SbLine is considered as a ray extending from the starting point in only one direction, or as a line intersecting the origin point and extending infinitely from it in both directions. SbLine is used by many other classes in Coin. See also SbVec3f
Constructor & Destructor Documentation
SbLine::SbLine (void)The default constructor does nothing. The line will be uninitialized until the first assignment or setValue() call.
SbLine::SbLine (const SbVec3f & origin, const SbVec3f & point)Constructor with origin specifying the line origin point, and point specifying another point on the line that is used to determine the line's direction. point should not be the same as origin, as this will lead to the line having a null vector as the direction vector. This will cause division by zero problems in some of the other methods on this class. Be aware that the direction vector will be normalized and not be the same as point - origin. See also setValue, setPosDir, getOrigin, getDirection
Member Function Documentation
void SbLine::setValue (const SbVec3f & origin, const SbVec3f & point)Set new position and direction of the line by specifying line origin and another point on the line that is used to determine the line's direction. point should not be the same as origin, as this will lead to having a null vector as the direction vector. This will cause division by zero problems in some of the other methods on this class. Be aware that the direction vector will be normalized and not be the same as point - origin. Method setPosDir(position, direction) should be preferred over a call to setValue(position, position + direction), because the latter causes numerical problems when position has a very large magnitude and direction is a normalized direction vector. See also setPosDir, getOrigin, getDirection
void SbLine::setPosDir (const SbVec3f & position, const SbVec3f & direction)Set position and direction. Be aware that the direction vector will be normalized and not be the same as provided to this method. See also setValue, getOrigin, getDirection Since Coin 4.0
SbBool SbLine::getClosestPoints (const SbLine & line2, SbVec3f & ptOnThis, SbVec3f & ptOnLine2) constReturns the two closest points on the lines. If the lines are parallel, all points are equally close and we return FALSE. If the lines are not parallel, the point positions will be stored in ptOnThis and ptOnLine2, and we'll return TRUE. Note that both SbLine instances are considered to be infinite in both directions from their definition points, as far as this function is concerned. See also getClosestPoint().
SbVec3f SbLine::getClosestPoint (const SbVec3f & point) constReturns the point on the line which is closest to point: _
Q D
SP x-----x------->
|
|
|
|
x P
P = argument point _
SP = line starting point, and D = line direction of this line
Q = point to find and return from function.fiThe vector defined by point and the returned point will be normal to the line.Note that the SbLine instance is considered to be infinite in both directions from its definition point, as far as this function is concerned.See also
getClosestPoints().
const SbVec3f & SbLine::getPosition (void) const
Return a vector representing the origin point on the line. See also setValue
const SbVec3f & SbLine::getDirection (void) constReturn a vector representing the direction of the line. The direction vector will always be normalized.
void SbLine::print (FILE * fp) constDump the state of this object to the file stream. Only works in debug version of library, method does nothing in an optimized compile.
AuthorGenerated automatically by Doxygen for Coin from the source code. 0
Johanes Gumabo
Data Size : 23,954 byte
man-SbLine.3coin4Build : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 2 / 183,391
Visitor ID : :
Visitor IP : 18.117.91.170 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.