public abstract class SpatialEntity extends Entity implements SpatialObject, VisibleObject
Constructor and Description |
---|
SpatialEntity(Model owner,
java.lang.String name,
java.lang.String visualModel,
boolean showInTrace)
Constructs a SpatialEntity
|
SpatialEntity(Model owner,
java.lang.String name,
java.lang.String visualModel,
boolean showInTrace,
Length startPositionX,
Length startPositionY,
Length startPositionZ)
Constructs a SpatialEntity with specific start position.
|
Modifier and Type | Method and Description |
---|---|
void |
addEntryPoint(java.lang.String name,
Length xPos,
Length yPos,
Length zPos)
Adds an entry point to this SpatialObject.
|
void |
addExitPoint(java.lang.String name,
Length xPos,
Length yPos,
Length zPos)
Adds an exit point to this SpatialObject.
|
Length[] |
getEntryPoint(java.lang.String name)
Gets the position of the given entry point.
|
Length[] |
getEntryPointGlobal(java.lang.String name)
Gets the position of the entry point in global coordinates.
|
java.util.Set<java.lang.String> |
getEntryPointNames()
Gets a set of names of all the entry points this SpatialObject contains.
|
Length[] |
getExitPoint(java.lang.String name)
Gets the position of the given exit point.
|
Length[] |
getExitPointGlobal(java.lang.String name)
Gets the position of the exit point in global coordinates.
|
java.util.Set<java.lang.String> |
getExitPointNames()
Gets a set of names of all the exit points this SpatialObject contains.
|
Matrix4d |
getMatrix()
Gets a 4x4 double matrix object which contains the spatial data of the SpatialObejct.
|
Length |
getPosX() |
Length |
getPosY() |
Length |
getPosZ() |
java.lang.String |
getVisualModel()
Get the type of the SpatialObject.
|
boolean |
isMovable()
Check whether this Object is a MovableSpatialObject or not.
|
boolean |
isVisible()
Shows the visibility of the visual representation of this object.
|
void |
removeVisible()
Sends a RemoveEvent to signal the observers that this object isn't
needed anymore.
|
void |
resetRotation()
Resets the rotation of the object.
|
void |
rotX(double angle)
Adds a rotation about the x-axis to the current orientation.
|
void |
rotY(double angle)
Adds a rotation about the y-axis to the current orientation.
|
void |
rotZ(double angle)
Adds a rotation about the z-axis to the current orientation.
|
void |
setPosition(Length x,
Length y,
Length z)
It sets the new position for the object
|
void |
setVisible(boolean visible)
Sets the visibility of the visual representation of this object.
|
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
getName
public SpatialEntity(Model owner, java.lang.String name, java.lang.String visualModel, boolean showInTrace)
owner
- The model this entity is associated to.name
- The name of the entity.visualModel
- The visual model 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 SpatialEntity(Model owner, java.lang.String name, java.lang.String visualModel, boolean showInTrace, Length startPositionX, Length startPositionY, Length startPositionZ)
owner
- The model this entity is associated to.name
- The name of the entity.visualModel
- The visual model 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.startPositionX
- The x start position in ExtendedLength.startPositionY
- The y start position in ExtendedLength.startPositionZ
- The z start position in ExtendedLength.public void addEntryPoint(java.lang.String name, Length xPos, Length yPos, Length zPos)
SpatialObject
addEntryPoint
in interface SpatialObject
name
- The name of this entry point.xPos
- The x-position of this entry point in local coordinates.yPos
- The y-position of this entry point in local coordinates.zPos
- The z-position of this entry point in local coordinates.public void addExitPoint(java.lang.String name, Length xPos, Length yPos, Length zPos)
SpatialObject
addExitPoint
in interface SpatialObject
name
- The name of this exit point.xPos
- The x-position of this exit point in local coordinates.yPos
- The y-position of this exit point in local coordinates.zPos
- The z-position of this exit point in local coordinates.public java.util.Set<java.lang.String> getEntryPointNames()
SpatialObject
getEntryPointNames
in interface SpatialObject
public java.util.Set<java.lang.String> getExitPointNames()
SpatialObject
getExitPointNames
in interface SpatialObject
public Length[] getEntryPoint(java.lang.String name)
SpatialObject
getEntryPoint
in interface SpatialObject
name
- The name of the entry point.public Length[] getEntryPointGlobal(java.lang.String name)
SpatialObject
getEntryPointGlobal
in interface SpatialObject
name
- The name of the entry point.public Length[] getExitPoint(java.lang.String name)
SpatialObject
getExitPoint
in interface SpatialObject
name
- The name of the exit point.public Length[] getExitPointGlobal(java.lang.String name)
SpatialObject
getExitPointGlobal
in interface SpatialObject
name
- The name of the exit point.public Matrix4d getMatrix()
SpatialObject
getMatrix
in interface SpatialObject
public Length getPosX()
getPosX
in interface SpatialObject
public Length getPosY()
getPosY
in interface SpatialObject
public Length getPosZ()
getPosZ
in interface SpatialObject
public java.lang.String getVisualModel()
VisibleObject
getVisualModel
in interface VisibleObject
public boolean isMovable()
SpatialObject
isMovable
in interface SpatialObject
public boolean isVisible()
VisibleObject
isVisible
in interface VisibleObject
public void removeVisible()
VisibleObject
removeVisible
in interface VisibleObject
public void resetRotation()
SpatialObject
resetRotation
in interface SpatialObject
public void rotX(double angle)
SpatialObject
rotX
in interface SpatialObject
angle
- The rotation angle in radianspublic void rotY(double angle)
SpatialObject
rotY
in interface SpatialObject
angle
- The rotation angle in radianspublic void rotZ(double angle)
SpatialObject
rotZ
in interface SpatialObject
angle
- The rotation angle in radianspublic void setPosition(Length x, Length y, Length z)
SpatialObject
setPosition
in interface SpatialObject
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 setVisible(boolean visible)
VisibleObject
setVisible
in interface VisibleObject
visible
- True, if visible. Else, false.