| 1 |
NAME SbLineProjector "SbLineProj" "" { line projector } |
| 2 |
|
| 3 |
INCLUDE projectors/SbLineProjector.h |
| 4 |
|
| 5 |
DESC { \cSbLineProjector\. |
| 6 |
projects a 2D point, typically the location of the cursor, onto a 3D line. |
| 7 |
} |
| 8 |
|
| 9 |
METHOD "" SbLineProjector() {} |
| 10 |
METHOD "" ~SbLineProjector() { |
| 11 |
Constructor and destructor. The default line passes through the origin |
| 12 |
and is aligned with the Y axis. |
| 13 |
} |
| 14 |
|
| 15 |
METHOD "" void setLine(const SbLine &line) {} |
| 16 |
METHOD "" const SbLine & getLine() const { |
| 17 |
Set and get the line on which to project 2D points. |
| 18 |
} |
| 19 |
|
| 20 |
METHOD "getVecMouse2" virtual SbVec3f getVector(const SbVec2f &mousePosition1, |
| 21 |
const SbVec2f &mousePosition2) { |
| 22 |
Get a vector on this line given two normalized mouse points. |
| 23 |
} |
| 24 |
|
| 25 |
METHOD "getVecMouse1" virtual SbVec3f getVector(const SbVec2f &mousePosition) { |
| 26 |
Get a vector given the current mouse point. |
| 27 |
Uses the last point on this projector from the previous |
| 28 |
call to |
| 29 |
\+\mgetVector()\. or \msetStartPostion()\..\. |
| 30 |
\-\mSbLineProjGetVecMouse1()\., \mSbLineProjSetStartPosMouse()\., |
| 31 |
or \mSbLineProjSetStartPosPt()\..\. |
| 32 |
Do not use this if the working space transform is changing since |
| 33 |
the new point will be in a different space than |
| 34 |
the old one. |
| 35 |
} |
| 36 |
|
| 37 |
METHOD "setStartPosMouse" void setStartPosition(const SbVec2f &mousePosition) { |
| 38 |
Set the initial position from a mouse position. |
| 39 |
} |
| 40 |
|
| 41 |
METHOD "setStartPosPt" void setStartPosition(const SbVec3f &point) { |
| 42 |
Set the initial position from a point on the projector. |
| 43 |
} |
| 44 |
|
| 45 |
ALSO { |
| 46 |
SbCylinderProjector, |
| 47 |
SbCylinderPlaneProjector, |
| 48 |
SbCylinderSectionProjector, |
| 49 |
SbCylinderSheetProjector, |
| 50 |
SbPlaneProjector, |
| 51 |
SbSpherePlaneProjector, |
| 52 |
SbSphereProjector, SbSphereSectionProjector, SbSphereSheetProjector |
| 53 |
} |
| 54 |
|
| 55 |
|
| 56 |
|