public abstract class Sensor
extends com.jme3.scene.control.AbstractControl
| Modifier and Type | Field and Description |
|---|---|
protected String |
id |
protected List<SensorListener> |
listeners |
| Modifier and Type | Method and Description |
|---|---|
void |
add(SensorListener sensorListener)
Adds a sensor listener and the sensor is enabled if it was disabled
in order to feed data to the listener
|
void |
cleanUp() |
protected com.jme3.scene.control.Control |
cloneControl(com.jme3.scene.control.Control control,
com.jme3.scene.Spatial spatial) |
String |
getId() |
boolean |
hasListener(SensorListener sl) |
protected void |
notifyListeners(SensorData sourceData) |
void |
remove(SensorListener sensorListener)
Removes a listener and if there are not more listener
the sensor is disabled in order to save resources
|
void |
setId(String id) |
protected String id
protected List<SensorListener> listeners
public Sensor(String id)
public void setId(String id)
public String getId()
public void add(SensorListener sensorListener)
sensorListener - public boolean hasListener(SensorListener sl)
public void remove(SensorListener sensorListener)
sensorListener - protected void notifyListeners(SensorData sourceData)
protected com.jme3.scene.control.Control cloneControl(com.jme3.scene.control.Control control,
com.jme3.scene.Spatial spatial)
public void cleanUp()
Copyright © 2015. All Rights Reserved.