Avara3D 0.2.0
C++ API reference
a3d::ext::WanderRotator Class Reference

Applies smoothly varying random rotation to a Node. More...

#include <a3d/extension/WanderRotator.h>

Public Member Functions

void update (Node &node, float deltaTime)
 Advances the rotation by deltaTime seconds and applies it to node. More...
 

Public Attributes

float minInterval {0.8f}
 Minimum time between target changes, in seconds. More...
 
float maxInterval {2.5f}
 Maximum time between target changes, in seconds. More...
 
float minSpeed {0.5f}
 Minimum target angular speed, in radians per second. More...
 
float maxSpeed {1.0f}
 Maximum target angular speed, in radians per second. More...
 
float smoothing
 Smoothing rate toward target angular velocity; larger values respond faster. More...
 

Detailed Description

Applies smoothly varying random rotation to a Node.

WanderRotator periodically chooses a random angular velocity and smoothly transitions toward it as update() advances.

Definition at line 28 of file WanderRotator.h.

Member Function Documentation

◆ update()

void a3d::ext::WanderRotator::update ( Node node,
float  deltaTime 
)

Advances the rotation by deltaTime seconds and applies it to node.

Member Data Documentation

◆ maxInterval

float a3d::ext::WanderRotator::maxInterval {2.5f}

Maximum time between target changes, in seconds.

Definition at line 34 of file WanderRotator.h.

◆ maxSpeed

float a3d::ext::WanderRotator::maxSpeed {1.0f}

Maximum target angular speed, in radians per second.

Definition at line 36 of file WanderRotator.h.

◆ minInterval

float a3d::ext::WanderRotator::minInterval {0.8f}

Minimum time between target changes, in seconds.

Definition at line 33 of file WanderRotator.h.

◆ minSpeed

float a3d::ext::WanderRotator::minSpeed {0.5f}

Minimum target angular speed, in radians per second.

Definition at line 35 of file WanderRotator.h.

◆ smoothing

float a3d::ext::WanderRotator::smoothing
Initial value:
{
1.0f}

Smoothing rate toward target angular velocity; larger values respond faster.

Definition at line 37 of file WanderRotator.h.


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