Class SbCylinderProjector
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.projectors.SbProjector
-
- com.openinventor.inventor.projectors.SbCylinderProjector
-
- Direct Known Subclasses:
SbCylinderSectionProjector
,SbCylinderSheetProjector
public class SbCylinderProjector extends SbProjector
Cylinder projector.SbCylinderProjector
is an abstract base class for projectors that use a cylinder in their projection. ThegetRotation()
method for anSbCylinderProjector
will always return a rotation that is about the axis of the cylinder. Cylinder projectors are 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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SbCylinder
getCylinder()
Gets the cylinder on which to project points.SbRotation
getRotation(SbVec3f point1, SbVec3f point2)
Gets a rotation given two points on this cylinder projector.boolean
isFront()
Gets whether the projector should intersect the half of the cylinder that faces the eye.boolean
isOrientToEye()
Gets whether the projector should always be oriented towards the eye.boolean
isPointInFront(SbVec3f point)
Gets whether the projector should intersect the half of the cylinder that faces the eye.SbRotation
projectAndGetRotation(SbVec2f point)
Applies the projector using the given point, returning the point in three dimensions that it projects to.void
setCylinder(SbCylinder cyl)
Sets the cylinder on which to project points.void
setFront(boolean isFront)
Sets whether the projector should intersect the half of the cylinder that faces the eye.void
setOrientToEye(boolean orientToEye)
Sets whether the projector should always be oriented towards the eye.-
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
-
-
-
-
Method Detail
-
setOrientToEye
public void setOrientToEye(boolean orientToEye)
Sets whether the projector should always be oriented towards the eye. Set to false if the tolerance should be evaluated in working space.
-
isPointInFront
public boolean isPointInFront(SbVec3f point)
Gets whether the projector should intersect the half of the cylinder that faces the eye.
-
isOrientToEye
public boolean isOrientToEye()
Gets whether the projector should always be oriented towards the eye.
-
setCylinder
public void setCylinder(SbCylinder cyl)
Sets the cylinder on which to project points. The default cylinder is aligned with the Y axis and has radius 1.0.
-
getCylinder
public SbCylinder getCylinder()
Gets the cylinder on which to project points.
-
getRotation
public SbRotation getRotation(SbVec3f point1, SbVec3f point2)
Gets a rotation given two points on this cylinder projector. The rotation will be about the axis of the cylinder.
-
isFront
public boolean isFront()
Gets whether the projector should intersect the half of the cylinder that faces the eye.
-
projectAndGetRotation
public SbRotation projectAndGetRotation(SbVec2f point)
Applies the projector using the given point, returning the point in three dimensions that it projects to. This also returns in rot a rotation about the axis of the cylinder from the last projected point to this one. The passed point should be normalized (i.e. lie in the range [0.0,1.0]), with (0,0) at the lower-left.
-
setFront
public void setFront(boolean isFront)
Sets whether the projector should intersect the half of the cylinder that faces the eye. Set to false if the projector should intersect with the rear half.
-
-