Triton
Visual simulation library for ocean rendering.
|
A RotorWash object will generate spray and circular waves on the ocean surface in the direction it is pointing. More...
#include <RotorWash.h>
Public Member Functions | |
RotorWash (Ocean *pOcean, double pRotorDiameter, bool pSprayEffects=false, bool pUseDecals=false) | |
Construct a RotorWash with the same Triton::Ocean it will be associated with. | |
void TRITONAPI | Update (const Vector3 &pPosition, const Vector3 &pDirection, double pVelocity, double pTime) |
For any active RotorWash, this should be called every frame to update its position and velocity. | |
Vector3 TRITONAPI | GetPosition () const |
Retrieves the world position of the RotorWash. | |
double TRITONAPI | GetVelocity () const |
Retrieves the airspeed velocity of the RotorWash. | |
A RotorWash object will generate spray and circular waves on the ocean surface in the direction it is pointing.
Triton::RotorWash::RotorWash | ( | Ocean * | pOcean, |
double | pRotorDiameter, | ||
bool | pSprayEffects = false , |
||
bool | pUseDecals = false |
||
) |
Construct a RotorWash with the same Triton::Ocean it will be associated with.
pOcean | The Triton::Ocean object you will associate this RotorWash with. A common error is to create a RotorWash before the Ocean has been created, so make sure this is a valid, non-null pointer. |
pRotorDiameter | The diameter of the rotor blades in world units. |
pSprayEffects | Whether you wish this wash to emit spray particles. |
pUseDecals | Whether decal textures should be used to provide a more detailed, but costly effect. |
|
inline |
Retrieves the world position of the RotorWash.
|
inline |
Retrieves the airspeed velocity of the RotorWash.
void TRITONAPI Triton::RotorWash::Update | ( | const Vector3 & | pPosition, |
const Vector3 & | pDirection, | ||
double | pVelocity, | ||
double | pTime | ||
) |
For any active RotorWash, this should be called every frame to update its position and velocity.
No wash will be generated until this is called.
pPosition | The position of the rotor, in world coordinates. |
pDirection | A normalized direction vector indicating the direction the rotors are pointing down toward. |
pVelocity | The velocity of the wind generating the wake, in world units per second. |
pTime | The current simulated time sample, in seconds. This may be relative to any reference point in time, as long as that reference point is consistent among the multiple calls to Update(). |