public abstract class MovableSpatialSimProcess extends SpatialSimProcess implements MovableSpatialObject
| Constructor and Description |
|---|
MovableSpatialSimProcess(Model owner,
java.lang.String name,
java.lang.String type,
boolean showInTrace)
Constructs a MovableSpatialSimProcess without specify the spatial data.
|
MovableSpatialSimProcess(Model owner,
java.lang.String name,
java.lang.String type,
boolean showInTrace,
double acc,
double dec,
double mSpeed)
Constructs a MovableSpatialSimProcess with specific acceleration and negative acceleration, maximum speed and position data.
|
MovableSpatialSimProcess(Model owner,
java.lang.String name,
java.lang.String type,
boolean showInTrace,
double acc,
double dec,
double mSpeed,
Length startPositionX,
Length startPositionY,
Length startPositionZ,
SpatialMovementManager manager)
Constructs a MovableSpatialSimProcess with specific acceleration and negative acceleration, maximum speed, position data and SpatialMovementManager for movement customizing.
|
| Modifier and Type | Method and Description |
|---|---|
void |
attach(MovableSpatialObject host)
Snaps to another MovableSpatialObject.
|
void |
cancelMovement()
Cancel the movement if there is a movement performing.
|
void |
cancelRotation()
Cancel the rotation if there is a rotation performing.
|
void |
detach()
Releases from the host object if this object is attached to it.
|
double |
getAcc()
Gets the acceleration of the object.
|
SpatialObject |
getCurrentLocation()
Returns the SpatialObject where this MovableSpatialObject is currently located.
|
Movement |
getCurrentMovement()
Gets the current Movement object.
|
Rotation |
getCurrentRotation()
Gets the current Rotation object.
|
double |
getCurrentSpeed()
Gets the current moving speed of the object.
|
double |
getDec()
Gets the negative acceleration of the object.
|
Matrix4d |
getMatrix()
Gets a 4x4 double matrix object which contains the spatial data of the SpatialObejct.
|
double |
getMaxSpeed()
Gets the maximum speed of the object.
|
Length |
getPosX() |
Length |
getPosY() |
Length |
getPosZ() |
boolean |
isAttached()
IShows whether the MovableSpatialObject is attached.
|
boolean |
isFocusedOnTrack()
Returns whether the FocusOnTrack function is on.
|
boolean |
isMoving()
Shows whether the MovableSpatialObject is moving.
|
boolean |
isMovingConcurrent()
Shows whether this object is moving concurrentlly.
|
boolean |
isRotating()
Shows whether the MovableSpatialObject is rotating.
|
void |
move(Movement movement,
boolean focusOnTrack)
Move the object to the destination according to the given movement object.
|
void |
move(SpatialObject destination,
java.lang.String entryPointName,
boolean focusOnTrack)
Move the object to the position of another SpatialObject without a specified duration.
|
void |
move(SpatialObject destination,
java.lang.String entryPointName,
TimeSpan duration,
boolean focusOnTrack)
Move the object to the position of another SpatialObject with a specified duration.
|
void |
move(SpatialObject destination,
java.lang.String entryPointName,
TimeSpan duration,
double maxSpeed,
double acc,
double dec,
boolean focusOnTrack)
Move the object to the position of another SpatialObject with specific attributes.
|
void |
moveConcurrent(Movement movement,
boolean focusOnTrack)
Move the object to the destination according to the given movement object.
|
void |
moveConcurrent(SpatialObject destination,
java.lang.String entryPointName,
boolean focusOnTrack)
Move the object to the position of another SpatialObject without a specified duration.
|
void |
moveConcurrent(SpatialObject destination,
java.lang.String entryPointName,
TimeSpan duration,
boolean focusOnTrack)
Move the object to the position of another SpatialObject with a specified duration.
|
void |
moveConcurrent(SpatialObject destination,
java.lang.String entryPointName,
TimeSpan duration,
double maxSpeed,
double acc,
double dec,
boolean focusOnTrack)
Move the object to the position of another SpatialObject with specific attributes.
|
void |
notifyMovingDone()
Notifies the MovableSpatialObject that the moving is finished and updates the new coordinates.
|
void |
notifyRotatingDone()
Notifies the MovableSpatialObject that the rotating is finished and updates the new coordinates.
|
void |
resetRotation()
Resets the rotation of the object.
|
void |
rotX(double angle)
Adds a rotation about the x-axis to the current orientation.
|
void |
rotX(double angle,
TimeSpan duration)
Rotates the object about the x-axis using an animation.
|
void |
rotXConcurrent(double angle,
TimeSpan duration)
Rotates the object about the x-axis using an animation.
|
void |
rotY(double angle)
Adds a rotation about the y-axis to the current orientation.
|
void |
rotY(double angle,
TimeSpan duration)
Rotates the object about the y-axis using an animation.
|
void |
rotYConcurrent(double angle,
TimeSpan duration)
Rotates the object about the y-axis using an animation.
|
void |
rotZ(double angle)
Adds a rotation about the z-axis to the current orientation.
|
void |
rotZ(double angle,
TimeSpan duration)
Rotates the object about the z-axis using an animation.
|
void |
rotZConcurrent(double angle,
TimeSpan duration)
Rotates the object about the z-axis using an animation.
|
void |
sendToLocation(SpatialObject destination)
Set this object to the position of the destination object and
change the currentLocation to the destination object.
|
void |
sendToLocationEntryPoint(SpatialObject destination,
java.lang.String entryPoint)
Set this object to the position of the given entry point of
the destination object.
|
void |
sendToLocationExitPoint(SpatialObject destination,
java.lang.String exitPoint)
Set this object to the position of the given exit point of
the destination object.
|
void |
setAcc(double acc)
Sets the acceleration of the object.
|
void |
setDec(double dec)
Sets the negative acceleration of the object.
|
void |
setMaxSpeed(double mSpeed)
Sets the maximum speed of this object
|
void |
setPosition(Length x,
Length y,
Length z)
It sets the new position for the object
|
addEntryPoint, addExitPoint, getEntryPoint, getEntryPointGlobal, getEntryPointNames, getExitPoint, getExitPointGlobal, getExitPointNames, getVisualModel, isMovable, isVisible, removeVisible, setVisibleactivate, activate, activate, activateAfter, activateBefore, activatePreempt, cancelInterruptDelayed, canCooperate, clearInterruptCode, cooperate, getActivatedBy, getInterruptCode, getInterruptException, getMaster, getRealTimeConstraint, getSchedulingPriority, getSlaveWaitQueue, getSupervisor, hold, hold, hold, interrupt, interrupt, interruptDelayed, interruptDelayed, isBlocked, isComponent, isDelayedInterruptScheduled, isInterrupted, isRepeating, isTerminated, lifeCycle, obtainResources, passivate, prepareTransport, reActivate, reActivate, resetMaster, returnAllResources, returnResources, setBlocked, setRealTimeConstraint, setRepeating, setSchedulingPriority, setSlaveWaitQueuegetIdentNumber, getQueueingPriority, getQueues, getScheduledEvents, isEqual, isLarger, isLargerOrEqual, isNotEqual, isQueued, isSimProcess, isSmaller, isSmallerOrEqual, schedule, schedule, schedule, schedule, schedule, schedule, schedule, schedule, schedule, scheduleAfter, scheduleAfter, scheduleAfter, scheduleBefore, scheduleBefore, scheduleBefore, schedulePreempt, schedulePreempt, schedulePreempt, setQueueingPriorityassignReporter, cancel, getCorrespondingReportable, isCurrent, isScheduled, rename, reSchedule, reSchedule, reSchedulePreempt, scheduledNext, setCorrespondingReportablecurrent, currentEntity, currentEntityAll, currentEvent, currentModel, currentSimProcess, debugIsOn, debugOff, debugOn, getModel, isExperimentCompatible, isModelCompatible, presentTime, sendDebugNote, sendMessage, sendTraceNote, sendWarning, skipTraceNote, skipTraceNote, traceIsOn, traceOff, traceOngetName, getQuotedName, toStringequals, getClass, hashCode, notify, notifyAll, wait, wait, waitaddEntryPoint, addExitPoint, getEntryPoint, getEntryPointGlobal, getEntryPointNames, getExitPoint, getExitPointGlobal, getExitPointNames, getName, isMovablepublic MovableSpatialSimProcess(Model owner, java.lang.String name, java.lang.String type, boolean showInTrace)
owner - The model this process is associated to.name - The name of the process.type - The type attribute belongs to the SpatialObject interface.showInTrace - Flag for showing entity in trace-files. Set it to true if entity should show up in trace. Set to false in entity should not be shown in trace.public MovableSpatialSimProcess(Model owner, java.lang.String name, java.lang.String type, boolean showInTrace, double acc, double dec, double mSpeed)
owner - The model this entity is associated to.name - The name of the entity.type - The type attribute belongs to the SpatialObject interface.showInTrace - showInTrace Flag for showing entity in trace-files. Set it to true if entity should show up in trace. Set to false in entity should not be shown in trace..acc - The acceleration of this MovableSpatialObject.dec - The breaking acceleration of this MovableSpatialObject (normally a negative value).mSpeed - The maximum speed of this MobavleSpatialObject.public MovableSpatialSimProcess(Model owner, java.lang.String name, java.lang.String type, boolean showInTrace, double acc, double dec, double mSpeed, Length startPositionX, Length startPositionY, Length startPositionZ, SpatialMovementManager manager)
owner - The model this entity is associated to.name - The name of the entity.type - The type attribute belongs to the SpatialObject interface.showInTrace - showInTrace Flag for showing entity in trace-files. Set it to true if entity should show up in trace. Set to false in entity should not be shown in trace.acc - The acceleration of this MovableSpatialObject.dec - The breaking acceleration of this MovableSpatialObject (normally a negative value)mSpeed - The maximum speed of this MovableSpatialObject.startPositionX - The x start position in ExtendedLength.startPositionY - The y start position in ExtendedLength.startPositionZ - The z start position in ExtendedLength.manager - a specific SpatialMovementManager which the user could have customized.public void attach(MovableSpatialObject host)
MovableSpatialObjectattach in interface MovableSpatialObjecthost - The MovableSpatialObject who to attach to.public void cancelMovement()
MovableSpatialObjectcancelMovement in interface MovableSpatialObjectpublic void cancelRotation()
MovableSpatialObjectcancelRotation in interface MovableSpatialObjectpublic void detach()
MovableSpatialObjectdetach in interface MovableSpatialObjectpublic double getAcc()
MovableSpatialObjectgetAcc in interface MovableSpatialObjectpublic SpatialObject getCurrentLocation()
MovableSpatialObjectgetCurrentLocation in interface MovableSpatialObjectpublic Movement getCurrentMovement()
MovableSpatialObjectgetCurrentMovement in interface MovableSpatialObjectpublic Rotation getCurrentRotation()
MovableSpatialObjectgetCurrentRotation in interface MovableSpatialObjectpublic double getCurrentSpeed()
MovableSpatialObjectgetCurrentSpeed in interface MovableSpatialObjectpublic double getDec()
MovableSpatialObjectgetDec in interface MovableSpatialObjectpublic Matrix4d getMatrix()
SpatialObjectgetMatrix in interface SpatialObjectgetMatrix in class SpatialSimProcesspublic double getMaxSpeed()
MovableSpatialObjectgetMaxSpeed in interface MovableSpatialObjectpublic Length getPosX()
getPosX in interface SpatialObjectgetPosX in class SpatialSimProcesspublic Length getPosY()
getPosY in interface SpatialObjectgetPosY in class SpatialSimProcesspublic Length getPosZ()
getPosZ in interface SpatialObjectgetPosZ in class SpatialSimProcesspublic boolean isAttached()
MovableSpatialObjectisAttached in interface MovableSpatialObjectpublic boolean isFocusedOnTrack()
MovableSpatialObjectisFocusedOnTrack in interface MovableSpatialObjectpublic boolean isMoving()
MovableSpatialObjectisMoving in interface MovableSpatialObjectpublic boolean isMovingConcurrent()
public boolean isRotating()
MovableSpatialObjectisRotating in interface MovableSpatialObjectpublic void move(SpatialObject destination, java.lang.String entryPointName, boolean focusOnTrack) throws SuspendExecution
MovableSpatialObjectmove in interface MovableSpatialObjectdestination - The destination object we want to move to.focusOnTrack - Whether the orientation of the moving object should focus to the moving direction.SuspendExecutionpublic void move(SpatialObject destination, java.lang.String entryPointName, TimeSpan duration, boolean focusOnTrack) throws SuspendExecution
MovableSpatialObjectmove in interface MovableSpatialObjectdestination - The destination object we want to move to.duration - The duration of the movement in TimeSpan.focusOnTrack - Whether the orientation of the moving object should focus to the moving direction.SuspendExecutionpublic void move(SpatialObject destination, java.lang.String entryPointName, TimeSpan duration, double maxSpeed, double acc, double dec, boolean focusOnTrack) throws SuspendExecution
MovableSpatialObjectmove in interface MovableSpatialObjectdestination - The destination object we want to move to.duration - The duration of the movement in TimeSpan(optional).maxSpeed - The maximum speed of the movement(optional).acc - The acceleration of the movement(optional).dec - The deceleration of the movement(optional).focusOnTrack - Whether the orientation of the moving object should focus to the moving direction.SuspendExecutionpublic void move(Movement movement, boolean focusOnTrack) throws SuspendExecution
MovableSpatialObjectmove in interface MovableSpatialObjectmovement - The movement which should be performed.focusOnTrack - Whether the orientation of the moving object should focus to the moving direction.SuspendExecutionpublic void moveConcurrent(SpatialObject destination, java.lang.String entryPointName, boolean focusOnTrack)
destination - The destination object we want to move to.enttryPointName - The name of the specific entry point at the destination object, which should be
steered to.focusOnTrack - Whether the orientation of the moving object should focus to the moving direction.public void moveConcurrent(SpatialObject destination, java.lang.String entryPointName, TimeSpan duration, boolean focusOnTrack)
destination - The destination object we want to move to.enttryPointName - The name of the specific entry point at the destination object, which should be
steered to.duration - The duration of the movement in TimeSpan.focusOnTrack - Whether the orientation of the moving object should focus to the moving direction.public void moveConcurrent(SpatialObject destination, java.lang.String entryPointName, TimeSpan duration, double maxSpeed, double acc, double dec, boolean focusOnTrack)
destination - The destination object we want to move to.enttryPointName - The name of the specific entry point at the destination object, which should be
steered to(optional).duration - The duration of the movement in TimeSpan(optional).maxSpeed - The maximum speed of the movement(optional).acc - The acceleration of the movement(optional).dec - The deceleration of the movement(optional).focusOnTrack - Whether the orientation of the moving object should focus to the moving direction.public void moveConcurrent(Movement movement, boolean focusOnTrack)
movement - The movement which should be performed.focusOnTrack - Whether the orientation of the moving object should focus to the moving direction.public void notifyMovingDone()
throws SuspendExecution
MovableSpatialObjectnotifyMovingDone in interface MovableSpatialObjectSuspendExecutionpublic void notifyRotatingDone()
throws SuspendExecution
MovableSpatialObjectnotifyRotatingDone in interface MovableSpatialObjectSuspendExecutionpublic void resetRotation()
SpatialObjectresetRotation in interface SpatialObjectresetRotation in class SpatialSimProcesspublic void rotX(double angle,
TimeSpan duration)
throws SuspendExecution
MovableSpatialObjectrotX in interface MovableSpatialObjectangle - The start angleduration - The duration of the animationSuspendExecutionpublic void rotY(double angle,
TimeSpan duration)
throws SuspendExecution
MovableSpatialObjectrotY in interface MovableSpatialObjectangle - The start angleduration - The duration of the animationSuspendExecutionpublic void rotZ(double angle,
TimeSpan duration)
throws SuspendExecution
MovableSpatialObjectrotZ in interface MovableSpatialObjectangle - The start angleduration - The duration of the animationSuspendExecutionpublic void rotX(double angle)
SpatialObjectrotX in interface SpatialObjectrotX in class SpatialSimProcessangle - The rotation angle in radianspublic void rotY(double angle)
SpatialObjectrotY in interface SpatialObjectrotY in class SpatialSimProcessangle - The rotation angle in radianspublic void rotZ(double angle)
SpatialObjectrotZ in interface SpatialObjectrotZ in class SpatialSimProcessangle - The rotation angle in radianspublic void rotXConcurrent(double angle,
TimeSpan duration)
angle - The start angleduration - The duration of the animationpublic void rotYConcurrent(double angle,
TimeSpan duration)
angle - The start angleduration - The duration of the animationpublic void rotZConcurrent(double angle,
TimeSpan duration)
angle - The start angleduration - The duration of the animationpublic void sendToLocation(SpatialObject destination)
MovableSpatialObjectsendToLocation in interface MovableSpatialObjectdestination - The destination this object will be send to.public void sendToLocationEntryPoint(SpatialObject destination, java.lang.String entryPoint)
MovableSpatialObjectsendToLocationEntryPoint in interface MovableSpatialObjectdestination - The destination object the currentLocation should be set to.entryPoint - The specific entry point of the destination object.public void sendToLocationExitPoint(SpatialObject destination, java.lang.String exitPoint)
MovableSpatialObjectsendToLocationExitPoint in interface MovableSpatialObjectdestination - The destination object the currentLocation should be set to.exitPoint - The specific exit point of the destination object
this object will be send to.public void setAcc(double acc)
MovableSpatialObjectsetAcc in interface MovableSpatialObjectacc - The accelerationpublic void setDec(double dec)
MovableSpatialObjectsetDec in interface MovableSpatialObjectdec - The negative accelerationpublic void setPosition(Length x, Length y, Length z)
SpatialObjectsetPosition in interface SpatialObjectsetPosition in class SpatialSimProcessx - The ExtendedLength which contains the new x-position.y - The ExtendedLength which contains the new y-position.z - The ExtendedLength which contains the new z-position.public void setMaxSpeed(double mSpeed)
MovableSpatialObjectsetMaxSpeed in interface MovableSpatialObjectmSpeed - The maximum speed of the object