#include <OsgSensor.h>
Inherited by osgSensor::KeyboardSensor, and osgSensor::TransformSensor.
Public Types | |
| enum | MatrixPropagateFlag |
| Specifies if matrix should be inverted or not when propagated. | |
| enum | EnableFlag { EnableNone = 0, EnableTranslationX = 1, EnableTranslationY = 2, EnableTranslationZ = 4, EnableRotationX = 8, EnableRotationY = 16, EnableRotationZ = 32, EnableNegTranslationX = 64, EnableNegTranslationY = 128, EnableNegTranslationZ = 256, EnableRotation = EnableRotationX| EnableRotationY| EnableRotationZ, EnableTranslation = EnableTranslationX|EnableTranslationY|EnableTranslationZ, EnableAll = EnableTranslation | EnableRotation } |
| Specifies what is propagated from the sensor to the matrix. More... | |
Public Member Functions | |
| const osg::Vec3 & | getTranslation () |
| Reads data from the sensor and returns the position. | |
| const osg::Quat & | getRotation () |
| Read data from the sensor and returns the rotation part (quaternion). | |
| const osg::Matrix & | getMatrix () |
| Reads data from the sensor and returns the matrix. | |
| void | setScale (const osg::Vec3 &scale) |
| Set the translation scale. By default (1,1,1). | |
| const osg::Vec3 & | getScale () const |
| Return the translation scale. | |
| void | setMatrixPropagateFlag (MatrixPropagateFlag flag) |
| Set matrix propagate flag (should matrix be inverted when propagated?). | |
| MatrixPropagateFlag | getMatrixPropagateFlag () |
| Get matrix propagate flag. | |
| void | setEnable (bool f) |
| Specifies if this sensor will propagate any information or not (Same result as setPropagate(EnableNone) but it wont change the EnableFlag. | |
| bool | getEnable () |
| Reurns wether this sensor is enabled or not. | |
| bool | isPropagated (EnableFlag f) |
| Is EnableFlag f set? | |
| void | setPropagate (EnableFlag f) |
| EnableFlag | getPropagate () |
| virtual bool | handle (int key) |
| void | setTranslationOffset (const osg::Vec3 &offset) |
| Set offset for sensor in global coordinate system. | |
| void | setLocalTranslationOffset (const osg::Vec3 &offset) |
| Set offset for sensor in local coordinate system. | |
Protected Member Functions | |
| virtual | ~OsgSensor () |
| Destructor. | |
| virtual void | sample () |
| Reads data from the sensor and updates all internal data. | |
| void | setTranslation (const osg::Vec3 &translation) |
| virtual const char * | className () |
| Returns the name of this class. | |
|
|
|
Specifies what the sensor will propagate. Possibility to select what the sensor will return, position and/or orientation etc. See EnableFlag |
|
|
Take care of a keyboard event
|
|
|
Specifies what the sensor will propagate. Possibility to select what the sensor will return, position and/or orientation etc. See EnableFlag |
|
|
Set the position of the sensor value. Will use Enable filter to only use the non filtered values from translation |
1.4.4