|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.expr.DynamicScope
com.threerings.opengl.scene.Scene
public abstract class Scene
Base class for scenes.
| Nested Class Summary | |
|---|---|
static class |
Scene.Transient
Extends the normal model class to include an optional pre-tick updater. |
| Field Summary |
|---|
| Fields inherited from interface com.threerings.expr.Scope |
|---|
EPOCH, NOW |
| Constructor Summary | |
|---|---|
Scene(GlContext ctx)
Creates a new scene. |
|
Scene(GlContext ctx,
int sources)
Creates a new scene. |
|
| Method Summary | |
|---|---|
void |
add(SceneElement element)
Adds an element to this scene. |
void |
add(SceneInfluence influence)
Adds an influence to this scene. |
void |
add(ViewerEffect effect)
Adds a viewer effect to this scene. |
void |
addAll(SceneElement[] elements)
Adds all of the specified elements to the scene. |
void |
boundsDidChange(SceneElement element)
Notes that the specified scene element's bounds have changed. |
void |
boundsDidChange(SceneInfluence influence)
Notes that the specified influence's bounds have changed. |
void |
boundsDidChange(ViewerEffect effect)
Notes that the specified effect's bounds have changed. |
void |
boundsWillChange(SceneElement element)
Notes that the specified scene element's bounds are about to change. |
void |
boundsWillChange(SceneInfluence influence)
Notes that the specified influence's bounds are about to change. |
void |
boundsWillChange(ViewerEffect effect)
Notes that the specified effect's bounds are about to change. |
void |
clearEffects()
Clears any viewer effects (when called outside the tick method). |
void |
dispose()
Releases the resources associated with this scope. |
void |
dumpViewerEffects()
Writes the set of active viewer effects out to the log. |
int |
getAlwaysTickCount()
Returns the size of the list of elements that we tick on every frame. |
abstract void |
getEffects(Box bounds,
Collection<ViewerEffect> results)
Retrieves all viewer effects whose bounds intersect the provided region. |
abstract void |
getElements(Box bounds,
Collection<SceneElement> results)
Retrieves all scene elements whose bounds intersect the provided region. |
Scene.Transient |
getFromTransientPool(ConfigReference<ModelConfig> ref)
Returns an instance of the referenced model from the transient pool. |
abstract void |
getInfluences(Box bounds,
Collection<SceneInfluence> results)
Retrieves all scene influences whose bounds intersect the provided region. |
SceneElement |
getIntersection(Ray3D ray,
Vector3f location)
Checks for an intersection between the provided ray and the contents of the scene. |
abstract SceneElement |
getIntersection(Ray3D ray,
Vector3f location,
Predicate<? super SceneElement> filter)
Checks for an intersection between the provided ray and the contents of the scene. |
int |
getUpdateInfluencesCount()
Returns the size of the set of elements whose influences must be updated. |
int |
getViewerEffectCount()
Returns the number of effects acting upon the viewer. |
int |
getVisibleTickCount()
Returns the size of the set of elements that we are going to tick because they're visible. |
void |
remove(SceneElement element)
Removes an element from the scene. |
void |
remove(SceneElement element,
boolean clearParentScope)
Removes an element from the scene. |
void |
remove(SceneInfluence influence)
Removes an influence from this scene. |
void |
remove(ViewerEffect effect)
Removes a viewer effect from this scene. |
void |
removeAll(SceneElement[] elements)
Removes all of the specified elements from the scene. |
void |
removeAll(SceneElement[] elements,
boolean clearParentScopes)
Removes all of the specified elements from the scene. |
void |
returnToTransientPool(Scene.Transient model)
Returns a model to the transient pool. |
Scene.Transient |
spawnTransient(ConfigReference<ModelConfig> ref,
Transform3D transform)
Spawns a transient model. |
void |
tick(float elapsed)
Updates the state of this object based on the elapsed time in seconds. |
void |
tickPolicyDidChange(SceneElement element)
Notes that the specified scene element's tick policy has changed. |
void |
tickPolicyWillChange(SceneElement element)
Notes that the specified scene element's tick policy is about to change. |
| Methods inherited from class com.threerings.expr.DynamicScope |
|---|
addListener, endCompoundUpdate, get, getParentScope, getScopeName, put, remove, removeListener, scopeUpdated, setParentScope, startCompoundUpdate, wasUpdated |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.threerings.opengl.compositor.Compositable |
|---|
composite |
| Constructor Detail |
|---|
public Scene(GlContext ctx)
public Scene(GlContext ctx,
int sources)
sources - the number of simultaneous sound sources to allow.| Method Detail |
|---|
@Scoped
public Scene.Transient spawnTransient(ConfigReference<ModelConfig> ref,
Transform3D transform)
@Scoped public Scene.Transient getFromTransientPool(ConfigReference<ModelConfig> ref)
@Scoped public void returnToTransientPool(Scene.Transient model)
public void addAll(SceneElement[] elements)
public void add(SceneElement element)
public void removeAll(SceneElement[] elements)
public void removeAll(SceneElement[] elements,
boolean clearParentScopes)
clearParentScopes - if true and the element is an instance of DynamicScope,
set the element's parent scope to null.public void remove(SceneElement element)
public void remove(SceneElement element,
boolean clearParentScope)
clearParentScope - if true and the element is an instance of DynamicScope,
set the element's parent scope to null.public void add(SceneInfluence influence)
public void remove(SceneInfluence influence)
public void add(ViewerEffect effect)
public void remove(ViewerEffect effect)
public SceneElement getIntersection(Ray3D ray,
Vector3f location)
location - a vector to populate with the location of the intersection, if any.
null for
none.
public abstract SceneElement getIntersection(Ray3D ray,
Vector3f location,
Predicate<? super SceneElement> filter)
filter - a predicate to use in filtering the results of the test.location - a vector to populate with the location of the intersection, if any.
null for
none.
public abstract void getElements(Box bounds,
Collection<SceneElement> results)
results - a list to hold the results of the search.
public abstract void getInfluences(Box bounds,
Collection<SceneInfluence> results)
public abstract void getEffects(Box bounds,
Collection<ViewerEffect> results)
public int getAlwaysTickCount()
public int getVisibleTickCount()
public int getUpdateInfluencesCount()
public int getViewerEffectCount()
public void dumpViewerEffects()
public void tickPolicyWillChange(SceneElement element)
tickPolicyDidChange(com.threerings.opengl.scene.SceneElement) when the change has been effected.
public void tickPolicyDidChange(SceneElement element)
public void boundsWillChange(SceneElement element)
boundsDidChange(SceneElement) when the change has been effected.
public void boundsDidChange(SceneElement element)
public void boundsWillChange(SceneInfluence influence)
boundsDidChange(SceneInfluence) when the change has been effected.
public void boundsDidChange(SceneInfluence influence)
public void boundsWillChange(ViewerEffect effect)
boundsDidChange(ViewerEffect) when the change has been effected.
public void boundsDidChange(ViewerEffect effect)
public void clearEffects()
public void tick(float elapsed)
Tickable
tick in interface Tickablepublic void dispose()
DynamicScope
dispose in class DynamicScope
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||