Package ptolemy.domains.gr.lib
Class ViewLayers3D
- java.lang.Object
-
- ptolemy.kernel.util.NamedObj
-
- ptolemy.kernel.InstantiableNamedObj
-
- ptolemy.kernel.Entity<T>
-
- ptolemy.kernel.ComponentEntity<T>
-
- ptolemy.actor.AtomicActor<TypedIOPort>
-
- ptolemy.actor.TypedAtomicActor
-
- ptolemy.domains.gr.lib.ViewLayers3D
-
- All Implemented Interfaces:
java.lang.Cloneable
,Actor
,Executable
,FiringsRecordable
,Initializable
,TypedActor
,Changeable
,Debuggable
,DebugListener
,Derivable
,Instantiable
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
public class ViewLayers3D extends TypedAtomicActor
A sink actor that renders layered structure for High Speed Sintering (HSS) 3D printing simulation. TODO: This is a very preliminary version. Still needs a lot of elaboration, including information for each layer (shape, color, etc.).- Since:
- Ptolemy II 11.0
- Version:
- $Id$
- Author:
- Hokeun Kim
- Pt.AcceptedRating:
- Red (acataldo)
- Pt.ProposedRating:
- Red (eal)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.kernel.Entity
Entity.ContainedObjectsIterator
-
-
Field Summary
Fields Modifier and Type Field Description ColorAttribute
backgroundColor
The background color.Parameter
horizontalResolution
The width in pixels of the display screen.Parameter
iterationSynchronized
Boolean variable that determines whether screen update is done once per iteration.TypedIOPort
layer
The input scene graph.Parameter
layerThickness
Floating-point variable for specifying thickness of each layer.Parameter
rotatable
Boolean variable that determines whether the user can rotate the model with the mouse.Parameter
scalable
Boolean variable that determines whether the user can move the point of view along the z axis using the mouse.Parameter
showAxes
Boolean variable that determines whether or not axes are shown.Parameter
translatable
Boolean variable that determines whether the user can translate the model with the mouse.Parameter
verticalResolution
The height in pixels of the display screen.-
Fields inherited from class ptolemy.actor.TypedAtomicActor
_typesValid
-
Fields inherited from class ptolemy.actor.AtomicActor
_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested
-
Fields inherited from class ptolemy.kernel.util.NamedObj
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _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
Constructors Constructor Description ViewLayers3D(CompositeEntity container, java.lang.String name)
Construct a ViewLayers3D in the given container with the given name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone(Workspace workspace)
Clone the actor into the specified workspace.void
fire()
Fire this actor.void
initialize()
Initialize the execution.boolean
postfire()
Return true, unless stop() has been called, in which case, return false.void
wrapup()
Wrapup an execution.-
Methods inherited from class ptolemy.actor.TypedAtomicActor
_containedTypeConstraints, _customTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints
-
Methods inherited from class ptolemy.actor.AtomicActor
_actorFiring, _actorFiring, _declareDelayDependency, 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
_addPort, _description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName
-
Methods inherited from class ptolemy.kernel.InstantiableNamedObj
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
-
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeChanged, attributeDeleted, attributeList, attributeList, decorators, 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, notifyOfNameChange, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, 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
-
Methods inherited from interface ptolemy.actor.Actor
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList
-
Methods inherited from interface ptolemy.kernel.util.Derivable
getDerivedLevel, getDerivedList, propagateValue
-
Methods inherited from interface ptolemy.actor.Executable
isFireFunctional, isStrict, iterate, prefire, stop, stopFire, terminate
-
Methods inherited from interface ptolemy.actor.Initializable
addInitializable, preinitialize, removeInitializable
-
Methods inherited from interface ptolemy.kernel.util.Nameable
description, getContainer, getDisplayName, getFullName, getName, getName, setName
-
-
-
-
Field Detail
-
layer
public TypedIOPort layer
The input scene graph. Actors that produce 3D objects can be connected to this port for rendering. The type of this port is sceneGraph.
-
backgroundColor
public ColorAttribute backgroundColor
The background color. Note that the alpha value (the fourth element of the array), which would normally specify transparency, is ignored.
-
horizontalResolution
public Parameter horizontalResolution
The width in pixels of the display screen. The larger of the vertical or horizontal size will correspond by default to one unit of distance, so this parameter determines the horizontal resolution as well as the size of the display. This is an int with default 400.
-
iterationSynchronized
public Parameter iterationSynchronized
Boolean variable that determines whether screen update is done once per iteration. This is a boolean with default false.
-
layerThickness
public Parameter layerThickness
Floating-point variable for specifying thickness of each layer.
-
rotatable
public Parameter rotatable
Boolean variable that determines whether the user can rotate the model with the mouse. This is a boolean with default true.
-
scalable
public Parameter scalable
Boolean variable that determines whether the user can move the point of view along the z axis using the mouse. This is a boolean with default false.
-
showAxes
public Parameter showAxes
Boolean variable that determines whether or not axes are shown. This parameter is a boolean with default false.
-
translatable
public Parameter translatable
Boolean variable that determines whether the user can translate the model with the mouse. This is a boolean with default false.
-
verticalResolution
public Parameter verticalResolution
The height in pixels of the display screen. The larger of the vertical or horizontal size will correspond by default to one unit of distance, so this parameter determines the horizontal resolution as well as the size of the display. This is an integer with default 400.
-
-
Constructor Detail
-
ViewLayers3D
public ViewLayers3D(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
Construct a ViewLayers3D 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.
-
-
Method Detail
-
clone
public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
Clone the actor into the specified workspace.- Overrides:
clone
in classTypedAtomicActor
- 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
Fire this actor.- Specified by:
fire
in interfaceExecutable
- Overrides:
fire
in classAtomicActor<TypedIOPort>
- Throws:
IllegalActionException
- Not thrown in this base class.
-
initialize
public void initialize() throws IllegalActionException
Initialize the execution. Create the ViewScreen frame if it hasn't been set using the place() method.- Specified by:
initialize
in interfaceInitializable
- Overrides:
initialize
in classAtomicActor<TypedIOPort>
- Throws:
IllegalActionException
- If the base class throws it.
-
postfire
public boolean postfire() throws IllegalActionException
Description copied from class:AtomicActor
Return true, unless stop() has been called, in which case, return false. Derived classes override this method to define operations to be performed at the end of every iteration of its execution, after one invocation of the prefire() method and any number of invocations of the fire() method. This method typically wraps up an iteration, which may involve updating local state. In derived classes, this method returns false to indicate that this actor should not be fired again.- Specified by:
postfire
in interfaceExecutable
- Overrides:
postfire
in classAtomicActor<TypedIOPort>
- Returns:
- True if execution can continue into the next iteration.
- Throws:
IllegalActionException
- Not thrown in this base class.
-
wrapup
public void wrapup() throws IllegalActionException
Wrapup an execution.- Specified by:
wrapup
in interfaceInitializable
- Overrides:
wrapup
in classAtomicActor<TypedIOPort>
- Throws:
IllegalActionException
- Not thrown in this base class.
-
-