Class SbCylinderProjector
java.lang.Object
com.openinventor.inventor.Inventor
com.openinventor.inventor.projectors.SbProjector
com.openinventor.inventor.projectors.SbCylinderProjector
- Direct Known Subclasses:
SbCylinderSectionProjector
,SbCylinderSheetProjector
Cylinder projector.
SbCylinderProjector
is an abstract base class for projectors that use a cylinder in their projection. The getRotation()
method for an SbCylinderProjector
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.
- 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
-
Method Summary
Modifier and TypeMethodDescriptionGets the cylinder on which to project points.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
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.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 Details
-
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
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
Sets the cylinder on which to project points. The default cylinder is aligned with the Y axis and has radius 1.0. -
getCylinder
Gets the cylinder on which to project points. -
getRotation
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
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.
-