com.md5importer.control
Class MD5AnimController

java.lang.Object
  extended by com.md5importer.control.AbstractController
      extended by com.md5importer.control.MD5AnimController
All Implemented Interfaces:
IController, IMD5AnimController

public class MD5AnimController
extends AbstractController
implements IMD5AnimController

MD5AnimController defines the concrete implementation of a logic controller unit that is responsible for updating the IMD5Anim instance given at construction time.


Field Summary
 
Fields inherited from class com.md5importer.control.AbstractController
active
 
Constructor Summary
MD5AnimController(IMD5Anim anim)
          Constructor of MD5AnimController.
 
Method Summary
 IMD5Anim getAnim()
          Retrieve the animation this controller controls.
 ERepeatType getRepeatType()
          Retrieve the current repeat type.
 boolean isBackward()
          Check if this animation is being played backward.
 boolean isCyleComplete()
          Check if one cycle of this animation is complete, but the new one has not yet started.
 void reset()
          Reset the controller by resetting the accumulated time to zero and resetting the animation to the first frame.
 void setRepeatType(ERepeatType type)
          Set the repeat type of this controller.
 void setSpeed(float speed)
          Set the speed of this controller.
 void update(float interpolation)
          Update the controller.
 
Methods inherited from class com.md5importer.control.AbstractController
isActive, setActive
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.md5importer.interfaces.control.IController
isActive, setActive
 

Constructor Detail

MD5AnimController

public MD5AnimController(IMD5Anim anim)
Constructor of MD5AnimController.

Parameters:
anim - The IMD5Anim instance.
Method Detail

update

public void update(float interpolation)
Description copied from interface: IController
Update the controller.

Specified by:
update in interface IController
Parameters:
interpolation - The Float time interpolation.

setRepeatType

public void setRepeatType(ERepeatType type)
Description copied from interface: IMD5AnimController
Set the repeat type of this controller.

Specified by:
setRepeatType in interface IMD5AnimController
Parameters:
type - The ERepeatType value.

setSpeed

public void setSpeed(float speed)
Description copied from interface: IMD5AnimController
Set the speed of this controller.

Specified by:
setSpeed in interface IMD5AnimController
Parameters:
speed - The Float speed.

getRepeatType

public ERepeatType getRepeatType()
Description copied from interface: IMD5AnimController
Retrieve the current repeat type.

Specified by:
getRepeatType in interface IMD5AnimController
Returns:
The ERepeatType enumeration.

getAnim

public IMD5Anim getAnim()
Description copied from interface: IMD5AnimController
Retrieve the animation this controller controls.

Specified by:
getAnim in interface IMD5AnimController
Returns:
The controlled IMD5Anim.

reset

public void reset()
Description copied from interface: IMD5AnimController
Reset the controller by resetting the accumulated time to zero and resetting the animation to the first frame.

Specified by:
reset in interface IMD5AnimController

isBackward

public boolean isBackward()
Description copied from interface: IMD5AnimController
Check if this animation is being played backward.

Specified by:
isBackward in interface IMD5AnimController
Returns:
True if the animation is being played backward. False forward.

isCyleComplete

public boolean isCyleComplete()
Description copied from interface: IMD5AnimController
Check if one cycle of this animation is complete, but the new one has not yet started.

Specified by:
isCyleComplete in interface IMD5AnimController
Returns:
True if one cycle is complete. False otherwise.