com.threerings.opengl.scene
Class SceneInfluence

java.lang.Object
  extended by com.threerings.util.ShallowObject
      extended by com.threerings.opengl.scene.SceneInfluence
All Implemented Interfaces:
SceneObject
Direct Known Subclasses:
AmbientLightInfluence, DefinerInfluence, FogInfluence, LightInfluence, ProjectorInfluence

public abstract class SceneInfluence
extends ShallowObject
implements SceneObject

Base class for things that influence scene elements.


Constructor Summary
SceneInfluence()
           
 
Method Summary
 Color4f getAmbientLight()
          Returns the ambient light color associated with this influence, or null for none.
 Box getBounds()
          Returns a reference to the bounds of the object.
 Tuple<String,Object>[] getDefinitions()
          Returns the definitions associated with this influence, or null for none.
 FogState getFogState()
          Returns the fog state associated with this influence, or null for none.
 Light getLight()
          Returns the light associated with this influence, or null for none.
 Projection getProjection()
          Returns the projection associated with this influence, or null for none.
 void reset()
          Resets the influence.
 boolean updateLastVisit(int visit)
          Checks and updates the last visit value.
 
Methods inherited from class com.threerings.util.ShallowObject
equals, hashCode
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SceneInfluence

public SceneInfluence()
Method Detail

getAmbientLight

public Color4f getAmbientLight()
Returns the ambient light color associated with this influence, or null for none.


getFogState

public FogState getFogState()
Returns the fog state associated with this influence, or null for none.


getLight

public Light getLight()
Returns the light associated with this influence, or null for none.


getProjection

public Projection getProjection()
Returns the projection associated with this influence, or null for none.


getDefinitions

public Tuple<String,Object>[] getDefinitions()
Returns the definitions associated with this influence, or null for none.


reset

public void reset()
Resets the influence.


getBounds

public Box getBounds()
Description copied from interface: SceneObject
Returns a reference to the bounds of the object.

Specified by:
getBounds in interface SceneObject

updateLastVisit

public boolean updateLastVisit(int visit)
Description copied from interface: SceneObject
Checks and updates the last visit value. This is used to determine when we have visited (e.g., rendered) the object without having to clear a flag for all objects before performing the operation. Instead, we use a unique visitation id for each operation and assume that any object with that id has been visited already.

Specified by:
updateLastVisit in interface SceneObject
Returns:
true if the last visit value was not equal to the value provided (and has now been set to that value), false if the object had already been visited during the current operation.


Copyright © 2011. All Rights Reserved.