net.jinx.physics.spring
Class SpringSheet

java.lang.Object
  extended by net.jinx.action.Actor
      extended by net.jinx.physics.spring.SpringSheet
All Implemented Interfaces:
OwnerListener, SceneListener, MultipassVisible, Visible

public class SpringSheet
extends Actor
implements OwnerListener, MultipassVisible


Constructor Summary
SpringSheet(java.lang.String name, int width, int height, int springDepth, float k, float b, float distance, Vector center, Vector velocity, float mass)
           
SpringSheet(java.lang.String name, int width, int height, int springDepth, float k, float b, float distance, Vector center, Vector velocity, float mass, boolean anchorEdges)
           
 
Method Summary
 void actorAdded(Actor actor, Scene scene)
          Called when an Actor has been added to the Scene.
 void actorRemoved(Actor actor, Scene scene)
          Called when an Actor has been removed from the Scene.
 void deinit(Context opt)
          Deinitializes this Visible, disposing of any resources that it may be using.
 void draw(Context opt)
          Renders this Visible to glDrawable.
 void drawPass(Context opt, Pass pass)
           
 void init(Context opt)
          Initializes this Visible, preparing it for rendering.
protected  void processEvent(ActorEvent event)
          Processes an ActorEvent.
 void setVisible(ParticleVisible visible)
           
 void tag(Tag tag)
           
 
Methods inherited from class net.jinx.action.Actor
checkAllowAdd, getName, getOwner, hashCode, ownerChanged, sendEvent, sendEvent, sendEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringSheet

public SpringSheet(java.lang.String name,
                   int width,
                   int height,
                   int springDepth,
                   float k,
                   float b,
                   float distance,
                   Vector center,
                   Vector velocity,
                   float mass)

SpringSheet

public SpringSheet(java.lang.String name,
                   int width,
                   int height,
                   int springDepth,
                   float k,
                   float b,
                   float distance,
                   Vector center,
                   Vector velocity,
                   float mass,
                   boolean anchorEdges)
Method Detail

actorAdded

public void actorAdded(Actor actor,
                       Scene scene)
Description copied from interface: SceneListener
Called when an Actor has been added to the Scene. It is also called once for each actor when the Listener is added to the Scene.

Specified by:
actorAdded in interface SceneListener
Parameters:
actor - the Actor that has been added.
scene - the Scene that this event came from.

actorRemoved

public void actorRemoved(Actor actor,
                         Scene scene)
Description copied from interface: SceneListener
Called when an Actor has been removed from the Scene. It is also called once for each actor when the Listener is removed from the Scene.

Specified by:
actorRemoved in interface SceneListener
Parameters:
actor - the Actor that has been removed.
scene - the Scene that this event came from.

tag

public void tag(Tag tag)

setVisible

public void setVisible(ParticleVisible visible)

init

public void init(Context opt)
Description copied from interface: Visible
Initializes this Visible, preparing it for rendering. If this Visible contains other Visibles, then their init methods MUST be called first. This is essential for DisplayList objects to function properly and efficiently.

Specified by:
init in interface Visible
Parameters:
opt - describes the rendering options that are being used.

draw

public void draw(Context opt)
Description copied from interface: Visible
Renders this Visible to glDrawable.

Specified by:
draw in interface Visible
Parameters:
opt - describes the rendering options that are being used.

drawPass

public void drawPass(Context opt,
                     Pass pass)
Specified by:
drawPass in interface MultipassVisible

deinit

public void deinit(Context opt)
Description copied from interface: Visible
Deinitializes this Visible, disposing of any resources that it may be using. If this Visible contains other Visibles, then their deinit methods MUST be called last. This is important for display lists.

Specified by:
deinit in interface Visible
Parameters:
opt - describes the rendering options that are being used.

processEvent

protected void processEvent(ActorEvent event)
Description copied from class: Actor
Processes an ActorEvent. This is what most Actor objects exist for.

Specified by:
processEvent in class Actor
Parameters:
event - the ActorEvent to process.