md3.md3view
Class MD3GLModelChangeCurrentFrameVisitor

java.lang.Object
  |
  +--md3.md3model.MD3ModelVisitor
        |
        +--md3.md3view.MD3GLModelVisitor
              |
              +--md3.md3view.MD3GLModelChangeCurrentFrameVisitor

public class MD3GLModelChangeCurrentFrameVisitor
extends MD3GLModelVisitor

An MD3GLModel visitor that walks through an MD3GLModel structure and applies the specified animation operation (NEXT, PREVIOUS or REWIND) to the animation state data of the encounterd models, taking the specified animation into account.

Author:
Erwin Vervaet (erwin@cs.kuleuven.ac.be)

Field Summary
protected static float FRACTION
           
static int NEXT
          Switch to the next frame.
static int PREVIOUS
          Switch to the previous frame.
static int REWIND
          Rewind the animation.
 
Constructor Summary
MD3GLModelChangeCurrentFrameVisitor(MD3Animation anim, int op)
          Create a new visitor to apply an animation operation (NEXT, REWIND, ...) to a MD3 model.
MD3GLModelChangeCurrentFrameVisitor(MD3Animation anim, int op, boolean interpolate)
          Create a new visitor to apply an animation operation (NEXT, REWIND, ...) to a MD3 model.
 
Method Summary
 boolean getInterpolate()
          Is interpolation currently enabled?
 void setInterpolate(boolean b)
          Enable or disable interpolation.
 void visit(MD3GLModel model)
          Visit a MD3GLModel object.
 
Methods inherited from class md3.md3view.MD3GLModelVisitor
visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FRACTION

protected static final float FRACTION

NEXT

public static final int NEXT

Switch to the next frame.


PREVIOUS

public static final int PREVIOUS

Switch to the previous frame.


REWIND

public static final int REWIND

Rewind the animation.

Constructor Detail

MD3GLModelChangeCurrentFrameVisitor

public MD3GLModelChangeCurrentFrameVisitor(MD3Animation anim,
                                           int op)

Create a new visitor to apply an animation operation (NEXT, REWIND, ...) to a MD3 model. No interpolation will be done.

Parameters:
anim - The animation that provides the context for the operation.
op - The operation to apply.

MD3GLModelChangeCurrentFrameVisitor

public MD3GLModelChangeCurrentFrameVisitor(MD3Animation anim,
                                           int op,
                                           boolean interpolate)

Create a new visitor to apply an animation operation (NEXT, REWIND, ...) to a MD3 model. The operation is executed in the context of the specified animation.

Parameters:
anim - The animation that provides the context for the operation.
op - The operation to apply.
interpolate - Should interpolation be done?
Method Detail

visit

public void visit(MD3GLModel model)
Description copied from class: MD3GLModelVisitor

Visit a MD3GLModel object.

Overrides:
visit in class MD3GLModelVisitor
Tags copied from class: MD3GLModelVisitor
Parameters:
model - The object to visit.

setInterpolate

public void setInterpolate(boolean b)

Enable or disable interpolation.


getInterpolate

public boolean getInterpolate()

Is interpolation currently enabled?