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
Spatials rotation using Quaternions.- 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidinterpolate(ReadOnlyQuaternion from, ReadOnlyQuaternion to, double delta, Spatial caller) Interpolates between the given quaternions using theQuaternion.slerpLocal(ReadOnlyQuaternion, ReadOnlyQuaternion, double)method.booleanvoidsetLocalRotation(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, updateDeltaAndIndexMethods 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:
interpolatein classInterpolationController<ReadOnlyQuaternion,Spatial> - Parameters:
from- The control to interpolate from.to- The control to interpolate to.delta- The distance betweenfromandto, will be between0.0and1.0(inclusive).caller- The object to interpolate, will not benull.
-
setLocalRotation
public void setLocalRotation(boolean localRotation) - Parameters:
localRotation-trueto update local rotation,falseto update world rotation.- See Also:
-
isLocalRotation
public boolean isLocalRotation()- Returns:
trueif the local rotation is being updated,falseif the world rotation is.- See Also:
-