Class SbLineProjector
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.projectors.SbProjector
-
- com.openinventor.inventor.projectors.SbLineProjector
-
public class SbLineProjector extends SbProjector
Line projector.SbLineProjector
projects a 2D point, typically the location of the cursor, onto a 3D line.
-
-
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 Constructor Description SbLineProjector()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SbLine
getLine()
Gets the line on which to project 2D points.SbVec3f
getVector(SbVec2f mousePosition)
Gets a vector given the current mouse point.SbVec3f
getVector(SbVec2f mousePosition1, SbVec2f mousePosition2)
Gets a vector on this line given two normalized mouse points.SbVec3f
project(SbVec2f point)
Applies the projector using the given point, returning the point in three dimensions that it projects to and the status.void
setLine(SbLine line)
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
-
-
-
-
Method Detail
-
setStartPosition
public void setStartPosition(SbVec2f mousePosition)
Sets the initial position from a mouse position.
-
project
public SbVec3f project(SbVec2f point)
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
public void setStartPosition(SbVec3f point)
Sets the initial position from a point on the projector.
-
getLine
public SbLine getLine()
Gets the line on which to project 2D points.
-
setLine
public void setLine(SbLine line)
Sets the line on which to project 2D points.
-
getVector
public SbVec3f getVector(SbVec2f mousePosition)
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.
-
-