|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object simbad.sim.BaseObject simbad.sim.SimpleAgent
This is the base class for all kinds of physical agents.
Implementation note : the agent doesnt have synchronized methods.
All thread refering to the agent should do explicit synchronization with synchronized(agent){...}..
Constructor Summary | |
SimpleAgent(javax.vecmath.Vector3d pos,
java.lang.String name)
Constructs a SimpleAgent. |
Method Summary | |
boolean |
anOtherAgentIsVeryNear()
Returns true if this agent is in physical contact with an other SimpleAgent. |
java.lang.String |
asString()
Returns printable description of the agent. |
void |
attach()
Re-add object to the scenegraph. |
boolean |
collisionDetected()
Returns the state of the geometric collision indicator. |
void |
detach()
Removes object from the scenegraph. |
ActuatorDevice |
getActuatorDevice(int num)
Returns the actuator device designated by num. |
java.util.ArrayList |
getActuatorList()
|
boolean |
getCanBeTraversed()
Gets the canBeTraversed Flag. |
void |
getCoords(javax.vecmath.Point3d coord)
Return agents coordinates. |
int |
getCounter()
Returns the agent counter. |
float |
getHeight()
Returns the agent's height in meters. |
double |
getLifeTime()
Returns the agent total lifetime since last reset (in seconds). |
float |
getMass()
Gets the agent's mass. |
java.lang.String |
getName()
Returns the agent's name. |
float |
getRadius()
Returns the agent's radius in meters. |
void |
getRotationTransform(javax.media.j3d.Transform3D t)
Obtain rotation transform. |
SensorDevice |
getSensorDevice(int num)
Returns the sensor device designated by num. |
java.util.ArrayList |
getSensorList()
|
void |
getTranslationTransform(javax.media.j3d.Transform3D t)
Obtain translation transform. |
SimpleAgent |
getVeryNearAgent()
Returns the currently touched agent - null if no agent near. |
boolean |
interactionDetected()
Returns true if an interaction has been detected. |
void |
moveToStartPosition()
Go to the start position of the agent. |
void |
rotateY(double angle)
Rotates (relative to current rotation) the object about Y axis. |
void |
setCanBeTraversed(boolean canbetraversed)
Sets the canBeTraversed Flag. |
void |
setColor(javax.vecmath.Color3f color)
Change the color while the simulation is running. |
void |
translateTo(javax.vecmath.Vector3d t)
Translates (relative to current pos) the object to given position. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SimpleAgent(javax.vecmath.Vector3d pos, java.lang.String name)
pos
- the starting position.name
- the name of the agent.Method Detail |
public boolean collisionDetected()
public boolean interactionDetected()
public void moveToStartPosition()
public java.lang.String asString()
public java.util.ArrayList getSensorList()
public java.util.ArrayList getActuatorList()
public double getLifeTime()
public void getCoords(javax.vecmath.Point3d coord)
public int getCounter()
public java.lang.String getName()
public float getMass()
public float getRadius()
public float getHeight()
public SensorDevice getSensorDevice(int num)
public ActuatorDevice getActuatorDevice(int num)
public boolean anOtherAgentIsVeryNear()
public SimpleAgent getVeryNearAgent()
public void translateTo(javax.vecmath.Vector3d t)
public void rotateY(double angle)
public void getTranslationTransform(javax.media.j3d.Transform3D t)
public void getRotationTransform(javax.media.j3d.Transform3D t)
public void detach()
public void attach()
public void setCanBeTraversed(boolean canbetraversed)
public boolean getCanBeTraversed()
public void setColor(javax.vecmath.Color3f color)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |