Class SbPlaneProjector
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.projectors.SbProjector
-
- com.openinventor.inventor.projectors.SbPlaneProjector
-
public class SbPlaneProjector extends SbProjector
Plane projector.SbPlaneProjector
projects the mouse onto a plane. This is typically used to write interactive 3D manipulators and viewers.
-
-
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 SbPlaneProjector()
Calls SbPlaneProjector(false).SbPlaneProjector(boolean orient)
Constructor.SbPlaneProjector(SbPlane plane)
Calls SbPlaneProjector(plane, false).SbPlaneProjector(SbPlane plane, boolean orient)
Constructor which is passed a plane.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SbPlane
getPlane()
Gets the plane to use.SbVec3f
getVector(SbVec2f mousePosition)
Gets a vector given the current mouse point.SbVec3f
getVector(SbVec2f mousePosition1, SbVec2f mousePosition2)
Gets a vector on this plane given two normalized mouse positions.boolean
isOrientToEye()
Gets whether the projector should be oriented towards the eye.void
setOrientToEye(boolean orientToEye)
Sets whether the projector should be oriented towards the eye.void
setPlane(SbPlane plane)
Sets the plane to use.void
setStartPosition(SbVec2f mousePosition)
Sets the initial 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, project, setViewVolume, setWorkingSpace
-
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
-
-
-
Constructor Detail
-
SbPlaneProjector
public SbPlaneProjector()
Calls SbPlaneProjector(false).
-
SbPlaneProjector
public SbPlaneProjector(SbPlane plane)
Calls SbPlaneProjector(plane, false).
-
SbPlaneProjector
public SbPlaneProjector(SbPlane plane, boolean orient)
Constructor which is passed a plane. If orient to eye is true, the plane will be reoriented to the eye.
-
SbPlaneProjector
public SbPlaneProjector(boolean orient)
Constructor. The default plane passes through the origin and is oriented perpendicular to the Z axis.
-
-
Method Detail
-
setStartPosition
public void setStartPosition(SbVec3f point)
Sets the initial position from a point on the projector.
-
setOrientToEye
public void setOrientToEye(boolean orientToEye)
Sets whether the projector should be oriented towards the eye. If orientToEye is set to true, the given plane's direction is ignored, and the plane will be oriented to the eye. It will pass through the same point from the origin defined by the original dir * dist. Set to false if the plane's direction should remain in working space.
-
getVector
public SbVec3f getVector(SbVec2f mousePosition1, SbVec2f mousePosition2)
Gets a vector on this plane given two normalized mouse positions.
-
setPlane
public void setPlane(SbPlane plane)
Sets the plane to use.
-
isOrientToEye
public boolean isOrientToEye()
Gets whether the projector should be oriented towards the eye.
-
setStartPosition
public void setStartPosition(SbVec2f mousePosition)
Sets the initial mouse position.
-
getPlane
public SbPlane getPlane()
Gets the plane to use.
-
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.
-
-