public interface MovableSpatialObject extends SpatialObject
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.
|
double |
getMaxSpeed()
Gets the maximum speed of the object.
|
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 |
rotX(double angle,
TimeSpan duration)
Rotates the object about the x-axis using an animation.
|
void |
rotY(double angle,
TimeSpan duration)
Rotates the object about the y-axis using an animation.
|
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 maxSpeed)
Sets the maximum speed of this object
|
addEntryPoint, addExitPoint, getEntryPoint, getEntryPointGlobal, getEntryPointNames, getExitPoint, getExitPointGlobal, getExitPointNames, getMatrix, getName, getPosX, getPosY, getPosZ, isMovable, resetRotation, rotX, rotY, rotZ, setPosition
void attach(MovableSpatialObject host)
host
- The MovableSpatialObject who to attach to.void cancelMovement()
void cancelRotation()
void detach()
double getAcc()
SpatialObject getCurrentLocation()
Movement getCurrentMovement()
Rotation getCurrentRotation()
double getCurrentSpeed()
double getDec()
double getMaxSpeed()
boolean isAttached()
boolean isFocusedOnTrack()
boolean isMoving()
boolean isRotating()
void move(SpatialObject destination, java.lang.String entryPointName, boolean focusOnTrack) throws SuspendExecution
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.SuspendExecution
void move(SpatialObject destination, java.lang.String entryPointName, TimeSpan duration, boolean focusOnTrack) throws SuspendExecution
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.SuspendExecution
void move(SpatialObject destination, java.lang.String entryPointName, TimeSpan duration, double maxSpeed, double acc, double dec, boolean focusOnTrack) throws SuspendExecution
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(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
void move(Movement movement, boolean focusOnTrack) throws SuspendExecution
movement
- The movement which should be performed.focusOnTrack
- Whether the orientation of the moving object should focus to the moving direction.SuspendExecution
void notifyMovingDone() throws SuspendExecution
SuspendExecution
void notifyRotatingDone() throws SuspendExecution
SuspendExecution
void rotX(double angle, TimeSpan duration) throws SuspendExecution
angle
- The start angleduration
- The duration of the animationSuspendExecution
void rotY(double angle, TimeSpan duration) throws SuspendExecution
angle
- The start angleduration
- The duration of the animationSuspendExecution
void rotZ(double angle, TimeSpan duration) throws SuspendExecution
angle
- The start angleduration
- The duration of the animationSuspendExecution
void sendToLocation(SpatialObject destination)
destination
- The destination this object will be send to.void sendToLocationEntryPoint(SpatialObject destination, java.lang.String entryPoint)
destination
- The destination object the currentLocation should be set to.entryPoint
- The specific entry point of the destination object.void sendToLocationExitPoint(SpatialObject destination, java.lang.String exitPoint)
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.void setAcc(double acc)
acc
- The accelerationvoid setDec(double dec)
dec
- The negative accelerationvoid setMaxSpeed(double maxSpeed)
maxSpeed
- The maximum speed of the object