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, setVisible
activate, 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, setSlaveWaitQueue
getIdentNumber, 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, setQueueingPriority
assignReporter, cancel, getCorrespondingReportable, isCurrent, isScheduled, rename, reSchedule, reSchedule, reSchedulePreempt, scheduledNext, setCorrespondingReportable
current, currentEntity, currentEntityAll, currentEvent, currentModel, currentSimProcess, debugIsOn, debugOff, debugOn, getModel, isExperimentCompatible, isModelCompatible, presentTime, sendDebugNote, sendMessage, sendTraceNote, sendWarning, skipTraceNote, skipTraceNote, traceIsOn, traceOff, traceOn
getName, getQuotedName, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
addEntryPoint, addExitPoint, getEntryPoint, getEntryPointGlobal, getEntryPointNames, getExitPoint, getExitPointGlobal, getExitPointNames, getName, isMovable
public 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)
MovableSpatialObject
attach
in interface MovableSpatialObject
host
- The MovableSpatialObject who to attach to.public void cancelMovement()
MovableSpatialObject
cancelMovement
in interface MovableSpatialObject
public void cancelRotation()
MovableSpatialObject
cancelRotation
in interface MovableSpatialObject
public void detach()
MovableSpatialObject
detach
in interface MovableSpatialObject
public double getAcc()
MovableSpatialObject
getAcc
in interface MovableSpatialObject
public SpatialObject getCurrentLocation()
MovableSpatialObject
getCurrentLocation
in interface MovableSpatialObject
public Movement getCurrentMovement()
MovableSpatialObject
getCurrentMovement
in interface MovableSpatialObject
public Rotation getCurrentRotation()
MovableSpatialObject
getCurrentRotation
in interface MovableSpatialObject
public double getCurrentSpeed()
MovableSpatialObject
getCurrentSpeed
in interface MovableSpatialObject
public double getDec()
MovableSpatialObject
getDec
in interface MovableSpatialObject
public Matrix4d getMatrix()
SpatialObject
getMatrix
in interface SpatialObject
getMatrix
in class SpatialSimProcess
public double getMaxSpeed()
MovableSpatialObject
getMaxSpeed
in interface MovableSpatialObject
public Length getPosX()
getPosX
in interface SpatialObject
getPosX
in class SpatialSimProcess
public Length getPosY()
getPosY
in interface SpatialObject
getPosY
in class SpatialSimProcess
public Length getPosZ()
getPosZ
in interface SpatialObject
getPosZ
in class SpatialSimProcess
public boolean isAttached()
MovableSpatialObject
isAttached
in interface MovableSpatialObject
public boolean isFocusedOnTrack()
MovableSpatialObject
isFocusedOnTrack
in interface MovableSpatialObject
public boolean isMoving()
MovableSpatialObject
isMoving
in interface MovableSpatialObject
public boolean isMovingConcurrent()
public boolean isRotating()
MovableSpatialObject
isRotating
in interface MovableSpatialObject
public void move(SpatialObject destination, java.lang.String entryPointName, boolean focusOnTrack) throws SuspendExecution
MovableSpatialObject
move
in interface MovableSpatialObject
destination
- The destination object we want to move to.focusOnTrack
- Whether the orientation of the moving object should focus to the moving direction.SuspendExecution
public void move(SpatialObject destination, java.lang.String entryPointName, TimeSpan duration, boolean focusOnTrack) throws SuspendExecution
MovableSpatialObject
move
in interface MovableSpatialObject
destination
- 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.SuspendExecution
public void move(SpatialObject destination, java.lang.String entryPointName, TimeSpan duration, double maxSpeed, double acc, double dec, boolean focusOnTrack) throws SuspendExecution
MovableSpatialObject
move
in interface MovableSpatialObject
destination
- 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.SuspendExecution
public void move(Movement movement, boolean focusOnTrack) throws SuspendExecution
MovableSpatialObject
move
in interface MovableSpatialObject
movement
- The movement which should be performed.focusOnTrack
- Whether the orientation of the moving object should focus to the moving direction.SuspendExecution
public 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
MovableSpatialObject
notifyMovingDone
in interface MovableSpatialObject
SuspendExecution
public void notifyRotatingDone() throws SuspendExecution
MovableSpatialObject
notifyRotatingDone
in interface MovableSpatialObject
SuspendExecution
public void resetRotation()
SpatialObject
resetRotation
in interface SpatialObject
resetRotation
in class SpatialSimProcess
public void rotX(double angle, TimeSpan duration) throws SuspendExecution
MovableSpatialObject
rotX
in interface MovableSpatialObject
angle
- The start angleduration
- The duration of the animationSuspendExecution
public void rotY(double angle, TimeSpan duration) throws SuspendExecution
MovableSpatialObject
rotY
in interface MovableSpatialObject
angle
- The start angleduration
- The duration of the animationSuspendExecution
public void rotZ(double angle, TimeSpan duration) throws SuspendExecution
MovableSpatialObject
rotZ
in interface MovableSpatialObject
angle
- The start angleduration
- The duration of the animationSuspendExecution
public void rotX(double angle)
SpatialObject
rotX
in interface SpatialObject
rotX
in class SpatialSimProcess
angle
- The rotation angle in radianspublic void rotY(double angle)
SpatialObject
rotY
in interface SpatialObject
rotY
in class SpatialSimProcess
angle
- The rotation angle in radianspublic void rotZ(double angle)
SpatialObject
rotZ
in interface SpatialObject
rotZ
in class SpatialSimProcess
angle
- 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)
MovableSpatialObject
sendToLocation
in interface MovableSpatialObject
destination
- The destination this object will be send to.public void sendToLocationEntryPoint(SpatialObject destination, java.lang.String entryPoint)
MovableSpatialObject
sendToLocationEntryPoint
in interface MovableSpatialObject
destination
- 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)
MovableSpatialObject
sendToLocationExitPoint
in interface MovableSpatialObject
destination
- 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)
MovableSpatialObject
setAcc
in interface MovableSpatialObject
acc
- The accelerationpublic void setDec(double dec)
MovableSpatialObject
setDec
in interface MovableSpatialObject
dec
- The negative accelerationpublic void setPosition(Length x, Length y, Length z)
SpatialObject
setPosition
in interface SpatialObject
setPosition
in class SpatialSimProcess
x
- 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)
MovableSpatialObject
setMaxSpeed
in interface MovableSpatialObject
mSpeed
- The maximum speed of the object