com.threerings.opengl.model
Class Articulated.Node

java.lang.Object
  extended by com.threerings.expr.SimpleScope
      extended by com.threerings.opengl.model.Articulated.Node
All Implemented Interfaces:
Scope, ScopeUpdateListener, Enqueueable
Direct Known Subclasses:
Articulated.MeshNode
Enclosing class:
Articulated

public static class Articulated.Node
extends SimpleScope
implements Enqueueable

A node in the model.


Field Summary
 int lastUpdate
          The value of the update counter at the last update (used when applying animation transforms to determine which transform is being applied first).
 float totalWeight
          The total weight of the animation transforms applied to this node.
 
Fields inherited from interface com.threerings.expr.Scope
EPOCH, NOW
 
Constructor Summary
Articulated.Node(GlContext ctx, Scope parentScope, ArticulatedConfig.Node config, Transform3D parentWorldTransform, Transform3D parentViewTransform)
          Creates a new node.
 
Method Summary
 void composite()
          Composites this node.
 void createSurfaces(GlContext ctx, ModelConfig.Imported.MaterialMapping[] materialMappings, Map<String,MaterialConfig> materialConfigs)
          Creates the surfaces of this node.
 void enqueue()
          Enqueues this object for rendering.
 Matrix4f getBoneMatrix()
          Returns this node's bone matrix (and flags it as a bone, if not already flagged).
 ArticulatedConfig.Node getConfig()
          Returns a reference to the configuration of this node.
 boolean getIntersection(Ray3D ray, Vector3f result)
          Checks for an intersection between the mesh in this node (if any) and the supplied ray.
 Transform3D getLocalTransform()
          Returns a reference to this node's local transform.
 Transform3D getParentViewTransform()
          Returns a reference to the parent view transform.
 Transform3D getParentWorldTransform()
          Returns a reference to the parent world transform.
 String getScopeName()
          Returns the name of this scope for purposes of qualification.
 Transform3D getViewTransform()
          Returns a reference to this node's view transform.
 Transform3D getWorldTransform()
          Returns a reference to this node's world transform.
 void setConfig(ArticulatedConfig.Node config, Transform3D parentWorldTransform, Transform3D parentViewTransform)
          Sets the configuration of this node.
 void setUpdater(Updater updater)
          Sets the updater to call after updating the view transform.
 void update()
          Updates the node for the current frame.
 
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
 

Field Detail

lastUpdate

public int lastUpdate
The value of the update counter at the last update (used when applying animation transforms to determine which transform is being applied first).


totalWeight

public float totalWeight
The total weight of the animation transforms applied to this node.

Constructor Detail

Articulated.Node

public Articulated.Node(GlContext ctx,
                        Scope parentScope,
                        ArticulatedConfig.Node config,
                        Transform3D parentWorldTransform,
                        Transform3D parentViewTransform)
Creates a new node.

Method Detail

setConfig

public void setConfig(ArticulatedConfig.Node config,
                      Transform3D parentWorldTransform,
                      Transform3D parentViewTransform)
Sets the configuration of this node.


getConfig

public ArticulatedConfig.Node getConfig()
Returns a reference to the configuration of this node.


getParentWorldTransform

public Transform3D getParentWorldTransform()
Returns a reference to the parent world transform.


getParentViewTransform

public Transform3D getParentViewTransform()
Returns a reference to the parent view transform.


getLocalTransform

public Transform3D getLocalTransform()
Returns a reference to this node's local transform.


getWorldTransform

public Transform3D getWorldTransform()
Returns a reference to this node's world transform.


getViewTransform

public Transform3D getViewTransform()
Returns a reference to this node's view transform.


getBoneMatrix

public Matrix4f getBoneMatrix()
Returns this node's bone matrix (and flags it as a bone, if not already flagged).


setUpdater

public void setUpdater(Updater updater)
Sets the updater to call after updating the view transform.


createSurfaces

public void createSurfaces(GlContext ctx,
                           ModelConfig.Imported.MaterialMapping[] materialMappings,
                           Map<String,MaterialConfig> materialConfigs)
Creates the surfaces of this node.


update

public void update()
Updates the node for the current frame.


getIntersection

public boolean getIntersection(Ray3D ray,
                               Vector3f result)
Checks for an intersection between the mesh in this node (if any) and the supplied ray.


composite

public void composite()
Composites this node.


enqueue

public void enqueue()
Description copied from interface: Enqueueable
Enqueues this object for rendering.

Specified by:
enqueue in interface Enqueueable

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 SimpleScope


Copyright © 2011. All Rights Reserved.