public class GRDirector extends StaticSchedulingDirector
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
NamedObj.ContainedObjectsIterator
Modifier and Type | Field and Description |
---|---|
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.
|
_postfireReturns, _prefire
_actorsFinishedExecution, _aspectForActor, _aspectsPresent, _defaultMicrostep, _executionAspects, _finishRequested, _initializables, _nextScheduleTime, _stopRequested, _tokenSentToCommunicationAspect, _zeroTime, localClock, startTime, stopTime
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
COMPLETED, NOT_READY, STOP_ITERATING
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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,
int microstep)
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.
|
_setScheduler, addDebugListener, getScheduler, isScheduleValid, removeDebugListener, resumeActor, setScheduler
_actorFinished, _consultTimeRegulators, _description, _isEmbedded, _isTopLevel, _schedule, _transferInputs, _transferOutputs, addInitializable, attributeChanged, createSchedule, defaultDependency, delayDependency, elapsedTimeSinceStart, finish, fireAt, fireAt, fireAtCurrentTime, fireContainerAt, fireContainerAt, getCausalityInterface, getDeadline, getEnvironmentTime, getExecutionAspect, getGlobalTime, getModelStartTime, getModelStopTime, getNextIterationTime, getStartTime, getStopTime, getTimeResolution, implementsStrictActorSemantics, initialize, invalidateResolvedTypes, isEmbedded, isFireFunctional, isStopRequested, isStrict, iterate, mutexLockObject, notifyTokenSentToCommunicationAspect, preinitialize, removeInitializable, requestInitialization, resume, scheduleContainedActors, setContainer, setCurrentTime, setEmbedded, setModelTime, setTimeResolution, stop, stopFire, suggestedModalModelDirectors, supportMultirateFiring, suspend, terminate, transferInputs, transferOutputs, transferOutputs
_checkContainer, _getContainedObject, _propagateExistence, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setName, updateContent
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateExistence, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, uniqueName, validateSettables, workspace
public Parameter iterations
public Parameter iterationTimeLowerBound
public GRDirector() throws IllegalActionException, NameDuplicationException
NameDuplicationException
- If construction of Time objects fails.IllegalActionException
- If construction of Time objects fails.public GRDirector(Workspace workspace) throws IllegalActionException, NameDuplicationException
workspace
- The workspace of this object.NameDuplicationException
- If construction of Time objects fails.IllegalActionException
- If construction of Time objects fails.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.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, int microstep) throws IllegalActionException
fireAt
in class Director
actor
- The actor scheduled to be fired.time
- The scheduled time.microstep
- The microstep.IllegalActionException
- If by the executive director.Director.fireAtCurrentTime(Actor)
,
Director.fireContainerAt(Time)
@Deprecated 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 StaticSchedulingDirector
IllegalActionException
- If the initialize() method of
one of the associated actors throws it.public void invalidateSchedule()
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 it