Triton
Visual simulation library for ocean rendering.
Public Member Functions | List of all members
Triton::RotorWash Class Reference

A RotorWash object will generate spray and circular waves on the ocean surface in the direction it is pointing. More...

#include <RotorWash.h>

Inheritance diagram for Triton::RotorWash:
Inheritance graph
[legend]
Collaboration diagram for Triton::RotorWash:
Collaboration graph
[legend]

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. More...
 
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. More...
 
Vector3 TRITONAPI GetPosition () const
 Retrieves the world position of the RotorWash. More...
 
double TRITONAPI GetVelocity () const
 Retrieves the airspeed velocity of the RotorWash. More...
 

Detailed Description

A RotorWash object will generate spray and circular waves on the ocean surface in the direction it is pointing.

Constructor & Destructor Documentation

◆ RotorWash()

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.

Parameters
pOceanThe 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.
pRotorDiameterThe diameter of the rotor blades in world units.
pSprayEffectsWhether you wish this wash to emit spray particles.
pUseDecalsWhether decal textures should be used to provide a more detailed, but costly effect.

Member Function Documentation

◆ GetPosition()

Vector3 TRITONAPI Triton::RotorWash::GetPosition ( ) const
inline

Retrieves the world position of the RotorWash.

Returns
The world position of the RotorWash, as last specified by Triton::RotorWash::Update().

◆ GetVelocity()

double TRITONAPI Triton::RotorWash::GetVelocity ( ) const
inline

Retrieves the airspeed velocity of the RotorWash.

Returns
The air velocity of the RotorWash in world units per second, as last specified by Triton::RotorWash::Update().

◆ Update()

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.

Parameters
pPositionThe position of the rotor, in world coordinates.
pDirectionA normalized direction vector indicating the direction the rotors are pointing down toward.
pVelocityThe velocity of the wind generating the wake, in world units per second.
pTimeThe 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().

The documentation for this class was generated from the following file: