Class SbProjector
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.projectors.SbProjector
-
- Direct Known Subclasses:
SbCylinderProjector
,SbLineProjector
,SbPlaneProjector
,SbSphereProjector
public class SbProjector extends Inventor
Base class for representing projectors.SbProjector
is the base class for all projector classes. Projector classes are used to convert from window space (usually based on the mouse location) into a 3D point. This is done by projecting the window coordinate as a 3D vector onto a geometric function in 3-space, and computing the intersection point. Most projectors actually compute incremental changes and produce incremental rotations and translation as needed. Projectors are used to write 3D interactive 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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SbProjector
copy()
Creates and returns an exact copy of the projector.SbViewVolume
getViewVolume()
Get the view volume to use for the projection.SbMatrix
getWorkingSpace()
Get the transform space to work in.SbVec3f
intersect(SbLine line)
Applies the projector using the given line in world coordinates, returning the point in three dimensions that it projects to.SbVec3f
project(SbVec2f point)
Apply the projector using the given point, returning the point in three dimensions that it projects to.void
setViewVolume(SbViewVolume vol)
Set the view volume to use for the projection.void
setWorkingSpace(SbMatrix space)
Set the transform space to work in.-
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
-
-
-
Method Detail
-
intersect
public SbVec3f intersect(SbLine line)
Applies the projector using the given line in world coordinates, returning the point in three dimensions that it projects to. Note: For the projectors that support "orientToEye", setting this flag to true causes the projector to orient to the line when the intersect method is called. New for v3.0.
-
project
public SbVec3f project(SbVec2f point)
Apply the projector using the given point, returning the point in three dimensions that it projects to. The point should be normalized (lie in the range [0.0,1.0]), with (0,0) at the lower-left.
-
setWorkingSpace
public void setWorkingSpace(SbMatrix space)
Set the transform space to work in. This matrix should transform working space coordinates into world space. The default matrix is identity, meaning that the default working space is world space.
-
setViewVolume
public void setViewVolume(SbViewVolume vol)
Set the view volume to use for the projection. This is typically supplied fromSoCamera.getViewVolume()
.
-
getWorkingSpace
public SbMatrix getWorkingSpace()
Get the transform space to work in.
-
getViewVolume
public SbViewVolume getViewVolume()
Get the view volume to use for the projection.
-
copy
public SbProjector copy()
Creates and returns an exact copy of the projector.
-
-