Class QuaternionInterpolationController
java.lang.Object
com.ardor3d.scenegraph.controller.ComplexSpatialController<Spatial>
com.ardor3d.scenegraph.controller.interpolation.InterpolationController<ReadOnlyQuaternion,Spatial>
com.ardor3d.scenegraph.controller.interpolation.QuaternionInterpolationController
- All Implemented Interfaces:
SpatialController<Spatial>
,Savable
,Serializable
public class QuaternionInterpolationController
extends InterpolationController<ReadOnlyQuaternion,Spatial>
QuaternionInterpolationController class interpolates a
Spatial
s rotation using Quaternion
s.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.ardor3d.scenegraph.controller.ComplexSpatialController
ComplexSpatialController.RepeatType
-
Field Summary
Fields inherited from class com.ardor3d.scenegraph.controller.interpolation.InterpolationController
DELTA_MAX, DELTA_MIN
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
interpolate
(ReadOnlyQuaternion from, ReadOnlyQuaternion to, double delta, Spatial caller) Interpolates between the given quaternions using theQuaternion.slerpLocal(ReadOnlyQuaternion, ReadOnlyQuaternion, double)
method.boolean
void
setLocalRotation
(boolean localRotation) Methods inherited from class com.ardor3d.scenegraph.controller.interpolation.InterpolationController
clampIndex, decrementDelta, decrementIndex, getControlFrom, getControls, getControlTo, getDelta, getIndex, getMaximumIndex, getMinimumIndex, incrementDelta, incrementIndex, isClamped, isCycleForward, reset, setControls, setControls, setCycleForward, setDelta, setIndex, setRepeatType, update, updateDeltaAndIndex
Methods inherited from class com.ardor3d.scenegraph.controller.ComplexSpatialController
getClassTag, getControllerValues, getMaxTime, getMinTime, getRepeatType, getSpeed, isActive, isRepeatTypeClamp, isRepeatTypeCycle, isRepeatTypeWrap, read, setActive, setControllerValues, setMaxTime, setMinTime, setSpeed, write
-
Constructor Details
-
QuaternionInterpolationController
public QuaternionInterpolationController()
-
-
Method Details
-
interpolate
protected void interpolate(ReadOnlyQuaternion from, ReadOnlyQuaternion to, double delta, Spatial caller) Interpolates between the given quaternions using theQuaternion.slerpLocal(ReadOnlyQuaternion, ReadOnlyQuaternion, double)
method.- Specified by:
interpolate
in classInterpolationController<ReadOnlyQuaternion,
Spatial> - Parameters:
from
- The control to interpolate from.to
- The control to interpolate to.delta
- The distance betweenfrom
andto
, will be between0.0
and1.0
(inclusive).caller
- The object to interpolate, will not benull
.
-
setLocalRotation
public void setLocalRotation(boolean localRotation) - Parameters:
localRotation
-true
to update local rotation,false
to update world rotation.- See Also:
-
isLocalRotation
public boolean isLocalRotation()- Returns:
true
if the local rotation is being updated,false
if the world rotation is.- See Also:
-