|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.kernel.util.NamedObj
ptolemy.kernel.util.Attribute
ptolemy.actor.Director
ptolemy.actor.sched.StaticSchedulingDirector
ptolemy.domains.gr.kernel.GRDirector
public class GRDirector
GR is a domain for displaying three-dimensional graphics in Ptolemy II. GR is an untimed domain in where actors are connected in an acyclic directed graph. Actors are fired according to a simple topological sort of the graph. Nodes in the graph that have no descendants are assumed to be consumers of data produced by the rest of the model.
The basic idea behind the GR domain is to arrange geometry and transform actors in a directed acyclic graph to represent the location and orientation of objects in a scene. This topology of connected GR actors form what is commonly called a scene graph in computer graphics literature. The GR director converts the GR scene graph into a Java3D representation for rendering on the computer screen.
GRReceiver
,
GRActor
,
Serialized Form
yellow (vogel) |
yellow (chf) |
Nested Class Summary |
---|
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj |
---|
NamedObj.ContainedObjectsIterator |
Field Summary | |
---|---|
private java.util.Set<Actor> |
_disabledActors
The set of actors that have returned false in their postfire() methods. |
private Director |
_insideDirector
|
private int |
_iteration
|
private long |
_lastIterationTime
|
private boolean |
_pseudoTimeEnabled
|
Parameter |
iterations
A parameter representing the number of times that postfire() may be called before it returns false. |
Parameter |
iterationTimeLowerBound
A parameter that indicates the time lower bound of each iteration. |
Fields inherited from class ptolemy.actor.sched.StaticSchedulingDirector |
---|
_postfireReturns |
Fields inherited from class ptolemy.actor.Director |
---|
_actorsFinishedExecution, _currentTime, _finishRequested, _initializables, _stopRequested, timeResolution |
Fields inherited from class ptolemy.kernel.util.NamedObj |
---|
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
Fields inherited from interface ptolemy.actor.Executable |
---|
COMPLETED, NOT_READY, STOP_ITERATING |
Constructor Summary | |
---|---|
GRDirector()
Construct a director in the default workspace with an empty string as its name. |
|
GRDirector(CompositeEntity container,
java.lang.String name)
Construct a director in the given container with the given name. |
|
GRDirector(Workspace workspace)
Construct a director in the workspace with an empty name. |
Method Summary | |
---|---|
private void |
_buildActorTable()
Create an actor table that caches all the actors directed by this director. |
private void |
_debugViewActorTable()
For debugging purposes. |
private void |
_fire()
Make sure that iterationLowerUpperBound milliseconds have elapsed since the last iteration. |
private ViewScreenInterface |
_getViewScreen()
Return the one view screen in the model under the control of this director. |
private void |
_init()
Most of the constructor initialization is relegated to this method. |
private void |
_reset()
|
java.lang.Object |
clone(Workspace workspace)
Clone the director into the specified workspace. |
void |
fire()
Override the super class method. |
Time |
fireAt(Actor actor,
Time time)
Schedule a firing of the given actor at the given time. |
double |
getCurrentTime()
Deprecated. As of Ptolemy II 4.1, replaced by getModelTime() |
Time |
getModelNextIterationTime()
Return maximum value for type double. |
Time |
getModelTime()
Return the current "time". |
void |
initialize()
Initialize all the actors associated with this director. |
void |
invalidateSchedule()
Process the mutation that occurred. |
Receiver |
newReceiver()
Return a new receiver consistent with the GR domain. |
boolean |
postfire()
Iterate all actors under control of this director and fire them. |
boolean |
prefire()
Always return true. |
void |
preinitialize()
Preinitialize the actors associated with this director and initialize the number of iterations to zero. |
void |
wrapup()
Reset this director to an uninitialized state to prepare for the end of an execution. |
Methods inherited from class ptolemy.actor.sched.StaticSchedulingDirector |
---|
_setScheduler, addDebugListener, getScheduler, isScheduleValid, removeDebugListener, setScheduler |
Methods inherited from class ptolemy.kernel.util.Attribute |
---|
_checkContainer, _getContainedObject, _propagateExistence, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setName, updateContent |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public Parameter iterations
public Parameter iterationTimeLowerBound
private java.util.Set<Actor> _disabledActors
private long _lastIterationTime
private boolean _pseudoTimeEnabled
private Director _insideDirector
private int _iteration
Constructor Detail |
---|
public GRDirector()
public GRDirector(Workspace workspace)
workspace
- The workspace of this object.public GRDirector(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- Container of the director.name
- Name of this director.
IllegalActionException
- If the
director is not compatible with the specified container.
NameDuplicationException
- If the container is not a
CompositeActor and the name collides with an entity in the container.Method Detail |
---|
public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
clone
in class StaticSchedulingDirector
workspace
- The workspace for the new object.
java.lang.CloneNotSupportedException
- If one of the attributes
cannot be cloned.NamedObj.exportMoML(Writer, int, String)
,
NamedObj.setDeferringChangeRequests(boolean)
public void fire() throws IllegalActionException
fire
in interface Executable
fire
in class StaticSchedulingDirector
IllegalActionException
- If any actor executed by this
actor return false in prefire.public Time fireAt(Actor actor, Time time) throws IllegalActionException
fireAt
in class Director
actor
- The actor scheduled to be fired.time
- The scheduled time.
IllegalActionException
- If by the executive director.Director.fireAtCurrentTime(Actor)
public double getCurrentTime()
getModelTime()
getCurrentTime
in class Director
Director.setCurrentTime(double)
public Time getModelTime()
getModelTime
in class Director
Director.setModelTime(Time)
public Time getModelNextIterationTime()
getModelNextIterationTime
in class Director
Director.getModelTime()
public void initialize() throws IllegalActionException
initialize
in interface Initializable
initialize
in class Director
IllegalActionException
- If the initialize() method of
one of the associated actors throws it.public void invalidateSchedule()
invalidateSchedule
in class StaticSchedulingDirector
NamedObj.attributeChanged(ptolemy.kernel.util.Attribute)
,
NamedObj.attributeTypeChanged(ptolemy.kernel.util.Attribute)
public Receiver newReceiver()
newReceiver
in class Director
public boolean postfire() throws IllegalActionException
postfire
in interface Executable
postfire
in class StaticSchedulingDirector
IllegalActionException
- If unable to get the parameter
iterations.public boolean prefire() throws IllegalActionException
prefire
in interface Executable
prefire
in class StaticSchedulingDirector
IllegalActionException
- Not thrown in this base classpublic void preinitialize() throws IllegalActionException
preinitialize
in interface Initializable
preinitialize
in class Director
IllegalActionException
- If the preinitialize() method of
one of the associated actors throws it.public void wrapup() throws IllegalActionException
wrapup
in interface Initializable
wrapup
in class Director
IllegalActionException
- If the parent class
throws itprivate void _buildActorTable() throws IllegalActionException
IllegalActionException
- If the scheduler is null.private void _debugViewActorTable() throws IllegalActionException
IllegalActionException
- If there is a problem in
obtaining the number of initial token for delay actorsprivate void _fire() throws IllegalActionException
IllegalActionException
- If an actor executed by this
director returns false in its prefire().private ViewScreenInterface _getViewScreen() throws IllegalActionException
IllegalActionException
- If there is more than one
view screen.private void _init()
private void _reset()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |