|
Avara3D 0.2.0
C++ API reference
|
Moves a Node along a smooth deterministic path within a configurable box. More...
#include <a3d/extension/Wanderer.h>
Classes | |
| struct | Config |
| Configures the wander volume, pace, and deterministic random sequence. More... | |
Public Member Functions | |
| Wanderer (const std::shared_ptr< Node > &node) | |
Creates a Wanderer centered on node's current position using the default Config. More... | |
| Wanderer (const std::shared_ptr< Node > &node, const Config &config) | |
Creates a Wanderer centered on node's current position using config. More... | |
| const Config & | config () const |
| Returns the current configuration. More... | |
| void | config (const Config &config) |
| Replaces the configuration and restarts the deterministic path from the current center. More... | |
| const math::vec3 & | center () const |
| Returns the center of the wander volume in the Node's parent coordinate space. More... | |
| void | update (double deltaTime) |
Advances the wander path by deltaTime seconds; non-positive values do nothing. More... | |
| void | reset () |
| Returns the Node to the current center and restarts the same deterministic path. More... | |
| void | recenter () |
| Makes the Node's current position the new center and restarts the deterministic path. More... | |
Moves a Node along a smooth deterministic path within a configurable box.
The wander volume is centered on a position in the Node's parent coordinate space.
Definition at line 31 of file Wanderer.h.
|
explicit |
Creates a Wanderer centered on node's current position using config.
| std::invalid_argument | if node is null or config is invalid. |
| const math::vec3 & a3d::ext::Wanderer::center | ( | ) | const |
Returns the center of the wander volume in the Node's parent coordinate space.
| const Config & a3d::ext::Wanderer::config | ( | ) | const |
Returns the current configuration.
| void a3d::ext::Wanderer::config | ( | const Config & | config | ) |
Replaces the configuration and restarts the deterministic path from the current center.
| std::invalid_argument | if config is invalid. |
| void a3d::ext::Wanderer::recenter | ( | ) |
Makes the Node's current position the new center and restarts the deterministic path.
| void a3d::ext::Wanderer::reset | ( | ) |
Returns the Node to the current center and restarts the same deterministic path.
| void a3d::ext::Wanderer::update | ( | double | deltaTime | ) |
Advances the wander path by deltaTime seconds; non-positive values do nothing.