public abstract class MovableSpatialEntity extends SpatialEntity implements MovableSpatialObject
| Constructor and Description |
|---|
MovableSpatialEntity(Model owner,
java.lang.String name,
java.lang.String type,
boolean showInTrace)
Constructs a MovableSpatialEntity without specify the spatial data.
|
MovableSpatialEntity(Model owner,
java.lang.String name,
java.lang.String type,
boolean showInTrace,
double acc,
double dec,
double mSpeed,
Length startPositionX,
Length startPositionY,
Length startPositionZ)
Constructs a MovableSpatialEntity with specific acceleration and negative acceleration, maximum speed and position data.
|
MovableSpatialEntity(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 MovableSpatialEntity 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 |
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 |
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 |
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 |
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 |
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, setVisiblegetIdentNumber, 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 MovableSpatialEntity(Model owner, java.lang.String name, java.lang.String type, boolean showInTrace)
owner - The model this entity is associated to.name - The name of the entity.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 MovableSpatialEntity(Model owner, java.lang.String name, java.lang.String type, boolean showInTrace, double acc, double dec, double mSpeed, Length startPositionX, Length startPositionY, Length startPositionZ)
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 MovableSpatialEntity(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 SpatialEntitypublic double getMaxSpeed()
MovableSpatialObjectgetMaxSpeed in interface MovableSpatialObjectpublic Length getPosX()
getPosX in interface SpatialObjectgetPosX in class SpatialEntitypublic Length getPosY()
getPosY in interface SpatialObjectgetPosY in class SpatialEntitypublic Length getPosZ()
getPosZ in interface SpatialObjectgetPosZ in class SpatialEntitypublic boolean isAttached()
MovableSpatialObjectisAttached in interface MovableSpatialObjectpublic boolean isFocusedOnTrack()
MovableSpatialObjectisFocusedOnTrack in interface MovableSpatialObjectpublic boolean isMoving()
MovableSpatialObjectisMoving in interface MovableSpatialObjectpublic boolean isRotating()
MovableSpatialObjectisRotating in interface MovableSpatialObjectpublic void move(SpatialObject destination, java.lang.String entryPointName, boolean focusOnTrack)
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.public void move(SpatialObject destination, java.lang.String entryPointName, TimeSpan duration, boolean focusOnTrack)
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.public void move(SpatialObject destination, java.lang.String entryPointName, TimeSpan duration, double maxSpeed, double acc, double dec, boolean focusOnTrack)
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.public void move(Movement movement, boolean focusOnTrack)
MovableSpatialObjectmove in interface MovableSpatialObjectmovement - The movement which should be performed.focusOnTrack - Whether the orientation of the moving object should focus to the moving direction.public void notifyMovingDone()
MovableSpatialObjectnotifyMovingDone in interface MovableSpatialObjectpublic void notifyRotatingDone()
MovableSpatialObjectnotifyRotatingDone in interface MovableSpatialObjectpublic void resetRotation()
SpatialObjectresetRotation in interface SpatialObjectresetRotation in class SpatialEntitypublic void rotX(double angle,
TimeSpan duration)
MovableSpatialObjectrotX in interface MovableSpatialObjectangle - The start angleduration - The duration of the animationpublic void rotY(double angle,
TimeSpan duration)
MovableSpatialObjectrotY in interface MovableSpatialObjectangle - The start angleduration - The duration of the animationpublic void rotZ(double angle,
TimeSpan duration)
MovableSpatialObjectrotZ in interface MovableSpatialObjectangle - The start angleduration - The duration of the animationpublic void rotX(double angle)
SpatialObjectrotX in interface SpatialObjectrotX in class SpatialEntityangle - The rotation angle in radianspublic void rotY(double angle)
SpatialObjectrotY in interface SpatialObjectrotY in class SpatialEntityangle - The rotation angle in radianspublic void rotZ(double angle)
SpatialObjectrotZ in interface SpatialObjectrotZ in class SpatialEntityangle - The rotation angle in radianspublic 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 setMaxSpeed(double mSpeed)
MovableSpatialObjectsetMaxSpeed in interface MovableSpatialObjectmSpeed - The maximum speed of the objectpublic void setPosition(Length x, Length y, Length z)
SpatialObjectsetPosition in interface SpatialObjectsetPosition in class SpatialEntityx - 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.