#include <CameraShake.h>
Public Types | |
enum | EDistanceModel { DIST_NONE, DIST_LINEAR, DIST_QUADRATIC } |
Public Member Functions | |
CameraShakeParams () | |
void | setAngles (const osg::Vec3f &dir) |
Sets angleTheta and anglePhi (but not amplitude) from a vector. | |
void | setAnglesRandom () |
Set random angleTheta and anglePhi angles. | |
Public Attributes | |
float | frequency |
Frequency of the movement, in Hz. | |
float | amplitude |
Amplitude of the movement (also named "rho"). | |
float | angleTheta |
Initial first angle of displacement (On the XY plane). | |
float | anglePhi |
Initial second angle of displacement. | |
float | dispersionTheta |
How much random will be put in angleTheta on each oscillation, in [0; PI]. | |
float | dispersionPhi |
How much random will be put in anglePhi on each oscillation, in [0; PI]. | |
float | timeFullAmplitude |
Duration of the effect where amplitude is taken at 100%. Should be <= totalTime. | |
float | totalTime |
Total duration of the effect (the amplitudes decreases from 100% at timeFullAmplitude to 0 at totalTime). Should be >= timeFullAmplitude. | |
EDistanceModel | distanceModel |
Describes how the effect is affected by the distance to the camera. |
Definition at line 46 of file CameraShake.h.
Definition at line 53 of file CameraShake.h.
CameraShakeParams::CameraShakeParams | ( | ) | [inline] |
Definition at line 48 of file CameraShake.h.
void CameraShakeParams::setAngles | ( | const osg::Vec3f & | dir | ) |
Sets angleTheta and anglePhi (but not amplitude) from a vector.
Definition at line 39 of file CameraShake.cpp.
References anglePhi, and angleTheta.
void CameraShakeParams::setAnglesRandom | ( | ) |
Set random angleTheta and anglePhi angles.
Definition at line 51 of file CameraShake.cpp.
References anglePhi, angleTheta, and rand().
Amplitude of the movement (also named "rho").
Definition at line 60 of file CameraShake.h.
Referenced by CameraShake::timedAmplitude().
Initial second angle of displacement.
Definition at line 62 of file CameraShake.h.
Referenced by setAngles(), setAnglesRandom(), and CameraShake::updateCameras().
Initial first angle of displacement (On the XY plane).
Definition at line 61 of file CameraShake.h.
Referenced by setAngles(), setAnglesRandom(), and CameraShake::updateCameras().
How much random will be put in anglePhi on each oscillation, in [0; PI].
Definition at line 64 of file CameraShake.h.
Referenced by CameraShake::updateCameras().
How much random will be put in angleTheta on each oscillation, in [0; PI].
Definition at line 63 of file CameraShake.h.
Referenced by CameraShake::updateCameras().
Describes how the effect is affected by the distance to the camera.
Definition at line 73 of file CameraShake.h.
Referenced by CameraShake::updateCameras().
Frequency of the movement, in Hz.
Definition at line 59 of file CameraShake.h.
Referenced by CameraShake::updateCameras().
Duration of the effect where amplitude is taken at 100%. Should be <= totalTime.
Definition at line 65 of file CameraShake.h.
Referenced by CameraShake::timedAmplitude().
Total duration of the effect (the amplitudes decreases from 100% at timeFullAmplitude to 0 at totalTime). Should be >= timeFullAmplitude.
Definition at line 66 of file CameraShake.h.
Referenced by CameraShake::ended(), and CameraShake::timedAmplitude().