ptolemy.domains.gr.lib
Class MovableViewScreen3D
java.lang.Object
ptolemy.kernel.util.NamedObj
ptolemy.kernel.InstantiableNamedObj
ptolemy.kernel.Entity
ptolemy.kernel.ComponentEntity
ptolemy.actor.AtomicActor
ptolemy.actor.TypedAtomicActor
ptolemy.domains.gr.kernel.GRActor
ptolemy.domains.gr.kernel.GRActor3D
ptolemy.domains.gr.lib.ViewScreen3D
ptolemy.domains.gr.lib.MovableViewScreen3D
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Actor, Executable, FiringsRecordable, Placeable, Initializable, TypedActor, ViewScreenInterface, Changeable, Debuggable, DebugListener, Derivable, Instantiable, ModelErrorHandler, MoMLExportable, Moveable, Nameable
public class MovableViewScreen3D
- extends ViewScreen3D
A sink actor that renders the GR geometry into a display screen
with movable viewpoint.
- Since:
- Ptolemy II 4.1
- Version:
- $Id: MovableViewScreen3D.java 57040 2010-01-27 20:52:32Z cxh $
- Author:
- Adam Cataldo
- See Also:
- Serialized Form
- Accepted Rating:
- Proposed Rating:
Fields inherited from class ptolemy.domains.gr.lib.ViewScreen3D |
_bounds, _branchRoot, _canvas, _container, _frame, _iterationSynchronized, _lastTransform, _mouseRotate, _root, _simpleUniverse, _userTransformation, backgroundColor, horizontalResolution, iterationSynchronized, rotatable, scalable, sceneGraphIn, showAxes, translatable, verticalResolution |
Fields inherited from class ptolemy.kernel.util.NamedObj |
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
Method Summary |
java.lang.Object |
clone(Workspace workspace)
Clone the actor into the specified workspace. |
void |
fire()
Call the ViewScreen fire() method, and translate and rotate the
image if needed. |
void |
initialize()
Call the ViewScreen initialize() method, and set the correct
location of the viewer. |
boolean |
postfire()
Update the input values of the state. |
void |
wrapup()
Reset the state to the initial values. |
Methods inherited from class ptolemy.domains.gr.lib.ViewScreen3D |
_addChild, _createViewScreen, _getHorizontalPixels, _getNodeObject, _getVerticalPixels, _makeBackground, _makeNodeConnection, _makeSceneGraphConnection, _startRenderer, _stopRenderer, addChild, getBranchGroup, getCanvas, place |
Methods inherited from class ptolemy.actor.AtomicActor |
_actorFiring, _actorFiring, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, declareDelayDependency, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, isFireFunctional, isStrict, iterate, newReceiver, outputPortList, prefire, preinitialize, pruneDependencies, recordFiring, removeActorFiringListener, removeDependency, removeInitializable, setContainer, stop, stopFire, terminate |
Methods inherited from class ptolemy.kernel.ComponentEntity |
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName |
Methods inherited from class ptolemy.kernel.Entity |
_description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName |
Methods inherited from class ptolemy.kernel.util.NamedObj |
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _debug, _debug, _debug, _debug, _debug, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _propagateValue, _recordDecoratedAttributes, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, attributeChanged, attributeList, attributeList, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, propagateValue, propagateValues, removeChangeListener, removeDebugListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspace |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
viewerPosition
PortParameter viewerPosition
- A double array representing the (x,y,z) position of the view
frame relative to the virtual universe. By default, this value
is (0,0,2.4).
viewerRotationAxis
PortParameter viewerRotationAxis
- A double array representing an axis of rotation for the view frame.
By default, when you look at the view screen, you are looking
in the (0.0, 0.0, -1.0) direction of the virtual universe. Your
right is the (1.0, 0.0, 0.0) direction, and up is the (0.0, 1.0, 0.0)
direction. In this situtation, the frame describing the viewer has
its positive z-axis going from the screen to you. It's positive
x-axis points right, and it's positve y-axis points up. When the
viewerRotationAxis and the viewerRotationAngle are provided, the
ViewScreen frame is rotated counterclockwise around the
viewerRotationAxis by the viewerRotationAngle.
viewerRotationAngle
PortParameter viewerRotationAngle
- A double value representing the angle, in radians, of rotation
about the viewerRotationAxis.
_position
private ArrayToken _position
_axis
private ArrayToken _axis
_angle
private DoubleToken _angle
_initialPosition
private ArrayToken _initialPosition
_initialAxis
private ArrayToken _initialAxis
_initialAngle
private DoubleToken _initialAngle
MovableViewScreen3D
public MovableViewScreen3D(CompositeEntity container,
java.lang.String name)
throws IllegalActionException,
NameDuplicationException
- Construct a ViewScreen in the given container with the given name.
If the container argument is null, a NullPointerException will
be thrown. If the name argument is null, then the name is set
to the empty string. Increment the version number of the workspace.
- Parameters:
container
- Container of the director.name
- Name of this ViewScreen.
- Throws:
IllegalActionException
- If this actor
is not compatible with the specified container.
NameDuplicationException
- If the container not a
CompositeActor and the name collides with an entity in the container.
clone
public java.lang.Object clone(Workspace workspace)
throws java.lang.CloneNotSupportedException
- Clone the actor into the specified workspace.
- Overrides:
clone
in class AtomicActor
- Parameters:
workspace
- The workspace for the new object.
- Returns:
- A new actor.
- Throws:
java.lang.CloneNotSupportedException
- If a derived class contains
an attribute that cannot be cloned.- See Also:
NamedObj.exportMoML(Writer, int, String)
,
NamedObj.setDeferringChangeRequests(boolean)
fire
public void fire()
throws IllegalActionException
- Call the ViewScreen fire() method, and translate and rotate the
image if needed.
- Specified by:
fire
in interface Executable
- Overrides:
fire
in class ViewScreen3D
- Throws:
IllegalActionException
- If the input array has the
wrong size.
initialize
public void initialize()
throws IllegalActionException
- Call the ViewScreen initialize() method, and set the correct
location of the viewer.
- Specified by:
initialize
in interface Initializable
- Overrides:
initialize
in class ViewScreen3D
- Throws:
IllegalActionException
- If the input array has the wrong size.
postfire
public boolean postfire()
throws IllegalActionException
- Update the input values of the state.
- Specified by:
postfire
in interface Executable
- Overrides:
postfire
in class ViewScreen3D
- Returns:
- Returns the value from its super class.
- Throws:
IllegalActionException
- Thrown if super class throws it.
wrapup
public void wrapup()
throws IllegalActionException
- Reset the state to the initial values.
- Specified by:
wrapup
in interface Initializable
- Overrides:
wrapup
in class ViewScreen3D
- Throws:
IllegalActionException
- Thrown if super class throws it.