|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsimbad.sim.BaseObject
simbad.sim.Device
public abstract class Device
A abstract device, base class for sensorDevice and ActuatorDevice. The class manages an update rate which will be used by the simulator.
Field Summary | |
---|---|
private double |
elapsedSinceUpdate
|
private boolean |
firstUpdate
|
private java.lang.String |
name
|
private SimpleAgent |
owner
|
private boolean |
updateOnEachFrame
|
private double |
updatePerSecond
|
Fields inherited from class simbad.sim.BaseObject |
---|
black, branchGroup, canBeTraversed, compilable, detachedFromSceneGraph, group, localBounds, material, rotation, rotationGroup, translation, translationGroup, white, world |
Constructor Summary | |
---|---|
Device()
|
Method Summary | |
---|---|
javax.swing.JPanel |
createInspectorPanel()
Creates the panel associated to the device. |
java.lang.String |
getName()
|
protected SimpleAgent |
getOwner()
Get the agent owner of this device |
double |
getUpdatePerSecond()
Returns the number of updates per second requested for this sensor. |
protected void |
reset()
to be overriden |
protected void |
setName(java.lang.String name)
|
protected void |
setOwner(SimpleAgent agent)
Set the agent owner of this device |
void |
setUpdateOnEachFrame(boolean on)
Sets if update happens on each frame . |
void |
setUpdatePerSecond(double ups)
Sets the number of update per seconds for this sensor. |
protected void |
update()
to be overriden |
protected void |
update(double elapsedSeconds)
Called by the simulator loop |
Methods inherited from class simbad.sim.BaseObject |
---|
addChild, addChild, attach, compile, create3D, detach, getBounds, getCanBeTraversed, getGroup, getNode, getRotationTransform, getRotationTransformGroup, getTranslation, getTranslationTransform, getTranslationTransform, resetTransforms, rotateY, setBounds, setCanBeTraversed, setColor, setWorld, translateTo |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private SimpleAgent owner
private java.lang.String name
private double updatePerSecond
private double elapsedSinceUpdate
private boolean firstUpdate
private boolean updateOnEachFrame
Constructor Detail |
---|
Device()
Method Detail |
---|
public java.lang.String getName()
protected void setName(java.lang.String name)
protected void setOwner(SimpleAgent agent)
protected SimpleAgent getOwner()
public javax.swing.JPanel createInspectorPanel()
public void setUpdatePerSecond(double ups)
public void setUpdateOnEachFrame(boolean on)
public double getUpdatePerSecond()
protected void update()
protected void reset()
protected void update(double elapsedSeconds)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |