Package com.jogamp.graph.ui
Class AnimGroup.TargetLerp
- java.lang.Object
-
- com.jogamp.graph.ui.AnimGroup.TargetLerp
-
- All Implemented Interfaces:
AnimGroup.LerpFunc
- Enclosing class:
- AnimGroup
public static class AnimGroup.TargetLerp extends Object implements AnimGroup.LerpFunc
Default targetAnimGroup.LerpFunc, approachingAnimGroup.ShapeData's target position inclusive angular rotation around given normalized axis.Implementation uses the current shape position and time delta since last call, hence allows rugged utilization even if shapes are dragged around.
-
-
Constructor Summary
Constructors Constructor Description TargetLerp(com.jogamp.math.Vec3f rotAxis)New targetAnimGroup.LerpFuncinstance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleaneval(long frame_cnt, AnimGroup.Set as, int idx, AnimGroup.ShapeData sd, float at_s, float dt_s)Evaluate next LERP step for the givenAnimGroup.ShapeDatawithin the animationAnimGroup.Set.
-
-
-
Constructor Detail
-
TargetLerp
public TargetLerp(com.jogamp.math.Vec3f rotAxis)
New targetAnimGroup.LerpFuncinstance- Parameters:
rotAxis- normalized axis vector forQuaternion.rotateByAngleNormalAxis(float, Vec3f)
-
-
Method Detail
-
eval
public boolean eval(long frame_cnt, AnimGroup.Set as, int idx, AnimGroup.ShapeData sd, float at_s, float dt_s)Description copied from interface:AnimGroup.LerpFuncEvaluate next LERP step for the givenAnimGroup.ShapeDatawithin the animationAnimGroup.Set.- Specified by:
evalin interfaceAnimGroup.LerpFunc- Parameters:
frame_cnt- frame count for the givenAnimGroup.ShapeDataas-AnimGroup.Setof the animationidx-AnimGroup.ShapeDataindex within theAnimGroup.Set.allShapessd- theAnimGroup.ShapeDatamatchingidxcontaining theShapeto apply this operationat_s- time delta to animation start, i.e. animation duration [s]dt_s- time delta to last call [s]- Returns:
- true if target animation shall continue, false otherwise
-
-