|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| 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 | |
|---|---|
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, _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 | |
|---|---|
java.lang.Object |
clone(Workspace workspace)
Clone the director into the specified workspace. |
void |
fire()
Override the super class method. |
void |
fireAt(Actor actor,
Time time)
Advance "time" to the next requested firing 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 |
|---|
_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
| 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 Attributeworkspace - 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 Executablefire in class StaticSchedulingDirectorIllegalActionException - If any actor executed by this
actor return false in prefire.
public void fireAt(Actor actor,
Time time)
throws IllegalActionException
fireAt in class Directoractor - The actor to be fired.time - The next time when the actor should be fired.
IllegalActionException - If setting the model time throws it.public double getCurrentTime()
getModelTime()
getCurrentTime in class DirectorDirector.setCurrentTime(double)public Time getModelTime()
getModelTime in class DirectorDirector.setModelTime(Time)public Time getModelNextIterationTime()
getModelNextIterationTime in class DirectorDirector.getModelTime()
public void initialize()
throws IllegalActionException
initialize in interface Initializableinitialize in class DirectorIllegalActionException - If the initialize() method of
one of the associated actors throws it.public void invalidateSchedule()
invalidateSchedule in class StaticSchedulingDirectorNamedObj.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 Executablepostfire in class StaticSchedulingDirectorIllegalActionException - If unable to get the parameter
iterations.
public boolean prefire()
throws IllegalActionException
prefire in interface Executableprefire in class StaticSchedulingDirectorIllegalActionException - Not thrown in this base class
public void preinitialize()
throws IllegalActionException
preinitialize in interface Initializablepreinitialize in class DirectorIllegalActionException - If the preinitialize() method of
one of the associated actors throws it.
public void wrapup()
throws IllegalActionException
wrapup in interface Initializablewrapup in class DirectorIllegalActionException - If the parent class
throws it
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||