Class SbPlaneProjector
java.lang.Object
com.openinventor.inventor.Inventor
com.openinventor.inventor.projectors.SbProjector
com.openinventor.inventor.projectors.SbPlaneProjector
Plane projector.
SbPlaneProjector
projects the mouse onto a plane. This is typically used to write interactive 3D manipulators and viewers.
- 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
ConstructorsConstructorDescriptionCalls 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
Modifier and TypeMethodDescriptiongetPlane()
Gets the plane to use.Gets a vector given the current mouse point.Gets a vector on this plane given two normalized mouse positions.boolean
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
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 Details
-
SbPlaneProjector
public SbPlaneProjector()Calls SbPlaneProjector(false). -
SbPlaneProjector
Calls SbPlaneProjector(plane, false). -
SbPlaneProjector
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 Details
-
setStartPosition
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
Gets a vector on this plane given two normalized mouse positions. -
setPlane
Sets the plane to use. -
isOrientToEye
public boolean isOrientToEye()Gets whether the projector should be oriented towards the eye. -
setStartPosition
Sets the initial mouse position. -
getPlane
Gets the plane to use. -
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.
-