Class SbLineProjector
java.lang.Object
com.openinventor.inventor.Inventor
com.openinventor.inventor.projectors.SbProjector
com.openinventor.inventor.projectors.SbLineProjector
Line projector.
SbLineProjector
projects a 2D point, typically the location of the cursor, onto a 3D line.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
Field Summary
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetLine()
Gets the line on which to project 2D points.Gets a vector given the current mouse point.Gets a vector on this line given two normalized mouse points.Applies the projector using the given point, returning the point in three dimensions that it projects to and the status.void
Sets the line on which to project 2D points.void
setStartPosition
(SbVec2f mousePosition) Sets the initial position from a mouse position.void
setStartPosition
(SbVec3f point) Sets the initial position from a point on the projector.Methods inherited from class com.openinventor.inventor.projectors.SbProjector
copy, getViewVolume, getWorkingSpace, intersect, setViewVolume, setWorkingSpace
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
Constructor Details
-
SbLineProjector
public SbLineProjector()Constructor. The default line passes through the origin and is aligned with the Y axis.
-
-
Method Details
-
setStartPosition
Sets the initial position from a mouse position. -
project
Applies the projector using the given point, returning the point in three dimensions that it projects to and the status. The point should be normalized from 0-1, with (0,0) at the lower-left.- Overrides:
project
in classSbProjector
-
setStartPosition
Sets the initial position from a point on the projector. -
getLine
Gets the line on which to project 2D points. -
setLine
Sets the line on which to project 2D points. -
getVector
Gets a vector given the current mouse point. Uses the last point on this projector from the previous call togetVector()
or setStartPostion(). Do not use this if the working space transform is changing since the new point will be in a different space than the old one. -
getVector
Gets a vector on this line given two normalized mouse points.
-