com.threerings.opengl.model
Class Wrapper

java.lang.Object
  extended by com.threerings.expr.SimpleScope
      extended by com.threerings.opengl.model.Model.Implementation
          extended by com.threerings.opengl.model.Wrapper
All Implemented Interfaces:
Scope, ScopeUpdateListener, Compositable, Intersectable, Tickable

public class Wrapper
extends Model.Implementation

A wrapper around a model implementation.


Field Summary
 
Fields inherited from interface com.threerings.expr.Scope
EPOCH, NOW
 
Constructor Summary
Wrapper(Scope parentScope, Model.Implementation impl)
           
 
Method Summary
 void attach(String point, Model model, boolean replace)
          Attaches the specified model at the given point.
 void composite()
          Adds this object's Dependencys and Enqueueables to the compositor in preparation for rendering.
 Animation createAnimation()
          Creates an animation for the model or returns null if not supported.
 void detach(Model model)
          Detaches an attached model.
 void detachAll(String point)
          Detaches any models attached to the specified point.
 void drawBounds()
          Draws the bounds of the model in immediate mode.
 Animation getAnimation(String name)
          Retrieves an animation by name.
 Animation[] getAnimations()
          Returns the model's list of animations.
 Box getBounds()
          Returns a reference to the bounds of the model.
 int getInfluenceFlags()
          Returns a set of flags indicating the types of influences that affect the model.
 boolean getIntersection(Ray3D ray, Vector3f result)
          Finds the intersection of a ray with this object and places it in the supplied vector (if it exists).
 List<Animation> getPlayingAnimations()
          Returns a list of all animations currently playing.
 Transform3D getPointWorldTransform(String point)
          Returns a reference to the world transform of the given point.
 String getScopeName()
          Returns the name of this scope for purposes of qualification.
 SceneElement.TickPolicy getTickPolicy()
          Returns the tick policy of the model.
 boolean hasCompleted()
          Determines whether the model (such as a transient effect) has completed.
 boolean isImplementation(Model.Implementation impl)
          Returns true if this is the implementation.
 void reset()
          Resets the state of this model.
 void setTickPolicy(SceneElement.TickPolicy policy)
          Sets the tick policy of the model.
 void tick(float elapsed)
          Updates the state of this object based on the elapsed time in seconds.
 void updateBounds()
          Updates the bounds of the model.
 void wasAdded()
          Notes that the model was added to a scene.
 void willBeRemoved()
          Notes that the model will be removed from the scene.
 
Methods inherited from class com.threerings.expr.SimpleScope
addListener, dispose, get, getParentScope, removeListener, scopeUpdated
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Wrapper

public Wrapper(Scope parentScope,
               Model.Implementation impl)
Method Detail

getPointWorldTransform

public Transform3D getPointWorldTransform(String point)
Description copied from class: Model.Implementation
Returns a reference to the world transform of the given point.

Overrides:
getPointWorldTransform in class Model.Implementation

attach

public void attach(String point,
                   Model model,
                   boolean replace)
Description copied from class: Model.Implementation
Attaches the specified model at the given point.

Overrides:
attach in class Model.Implementation
replace - if true, replace any existing attachments at the point.

detach

public void detach(Model model)
Description copied from class: Model.Implementation
Detaches an attached model.

Overrides:
detach in class Model.Implementation

detachAll

public void detachAll(String point)
Description copied from class: Model.Implementation
Detaches any models attached to the specified point.

Overrides:
detachAll in class Model.Implementation

getPlayingAnimations

public List<Animation> getPlayingAnimations()
Description copied from class: Model.Implementation
Returns a list of all animations currently playing.

Overrides:
getPlayingAnimations in class Model.Implementation

getAnimation

public Animation getAnimation(String name)
Description copied from class: Model.Implementation
Retrieves an animation by name.

Overrides:
getAnimation in class Model.Implementation

getAnimations

public Animation[] getAnimations()
Description copied from class: Model.Implementation
Returns the model's list of animations.

Overrides:
getAnimations in class Model.Implementation

createAnimation

public Animation createAnimation()
Description copied from class: Model.Implementation
Creates an animation for the model or returns null if not supported.

Overrides:
createAnimation in class Model.Implementation

hasCompleted

public boolean hasCompleted()
Description copied from class: Model.Implementation
Determines whether the model (such as a transient effect) has completed.

Overrides:
hasCompleted in class Model.Implementation

reset

public void reset()
Description copied from class: Model.Implementation
Resets the state of this model.

Overrides:
reset in class Model.Implementation

getInfluenceFlags

public int getInfluenceFlags()
Description copied from class: Model.Implementation
Returns a set of flags indicating the types of influences that affect the model.

Overrides:
getInfluenceFlags in class Model.Implementation

getBounds

public Box getBounds()
Description copied from class: Model.Implementation
Returns a reference to the bounds of the model.

Overrides:
getBounds in class Model.Implementation

updateBounds

public void updateBounds()
Description copied from class: Model.Implementation
Updates the bounds of the model.

Overrides:
updateBounds in class Model.Implementation

drawBounds

public void drawBounds()
Description copied from class: Model.Implementation
Draws the bounds of the model in immediate mode.

Overrides:
drawBounds in class Model.Implementation

setTickPolicy

public void setTickPolicy(SceneElement.TickPolicy policy)
Description copied from class: Model.Implementation
Sets the tick policy of the model.

Overrides:
setTickPolicy in class Model.Implementation

getTickPolicy

public SceneElement.TickPolicy getTickPolicy()
Description copied from class: Model.Implementation
Returns the tick policy of the model.

Overrides:
getTickPolicy in class Model.Implementation

wasAdded

public void wasAdded()
Description copied from class: Model.Implementation
Notes that the model was added to a scene.

Overrides:
wasAdded in class Model.Implementation

willBeRemoved

public void willBeRemoved()
Description copied from class: Model.Implementation
Notes that the model will be removed from the scene.

Overrides:
willBeRemoved in class Model.Implementation

isImplementation

public boolean isImplementation(Model.Implementation impl)
Description copied from class: Model.Implementation
Returns true if this is the implementation.

Overrides:
isImplementation in class Model.Implementation

tick

public void tick(float elapsed)
Description copied from interface: Tickable
Updates the state of this object based on the elapsed time in seconds.

Specified by:
tick in interface Tickable
Overrides:
tick in class Model.Implementation

getIntersection

public boolean getIntersection(Ray3D ray,
                               Vector3f result)
Description copied from interface: Intersectable
Finds the intersection of a ray with this object and places it in the supplied vector (if it exists).

Specified by:
getIntersection in interface Intersectable
Overrides:
getIntersection in class Model.Implementation
Returns:
true if the ray intersected the object (in which case the result will contain the point of intersection), false otherwise.

composite

public void composite()
Description copied from interface: Compositable
Adds this object's Dependencys and Enqueueables to the compositor in preparation for rendering.

Specified by:
composite in interface Compositable
Overrides:
composite in class Model.Implementation

getScopeName

public String getScopeName()
Description copied from interface: Scope
Returns the name of this scope for purposes of qualification. Can return null if qualified symbols cannot specifically address this scope.

Specified by:
getScopeName in interface Scope
Overrides:
getScopeName in class Model.Implementation


Copyright © 2011. All Rights Reserved.