|
Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
|
#include <SpringBone.hpp>
Public Member Functions | |
| SpringBone ()=default | |
| bool | operator== (const SpringBone &) const =default |
| Compared member by member: what the change audit checks a write of this component against (Registry::auditChanges). | |
Public Attributes | |
| bool | enabled {true} |
| Simulated this frame. Off leaves the chain exactly as the animation poses it. | |
| f32 | stiffness {0.1f} |
| How hard each bone is pulled back toward the pose the animation gives it, 0 to 1. | |
| f32 | drag {0.5f} |
| How much of its velocity a bone loses each frame, 0 to 1. | |
| glm::vec3 | gravity {0.0f, -980.0f, 0.0f} |
| Gravity on the chain, in world units a second squared. | |
| glm::vec3 | wind {0.0f, 0.0f, 0.0f} |
| A steady wind on the chain, in world units a second squared. | |
| f32 | windGust {0.0f} |
| How far gusts swing the wind's strength, 0 to 1. | |
| f32 | windFrequency {0.5f} |
| Gusts a second. | |
| f32 | endLength {0.0f} |
| How far the last bones of a chain reach past themselves, in world units: a leaf has no child to aim at, so this gives it a tip. 0 leaves leaves unsimulated. | |
| f32 | radius {0.0f} |
| The thickness of the strand, in world units, kept clear of every collider. | |
| f32 | weight {1.0f} |
| How much of the simulated pose is used, 0 to 1: 0 is the animation alone. | |
| std::vector< Entity > | colliders |
| Entities with a SpringBoneCollider this chain keeps out of. | |
Definition at line 37 of file SpringBone.hpp.
|
default |
References SpringBone().
Referenced by SpringBone(), and operator==().
|
default |
Compared member by member: what the change audit checks a write of this component against (Registry::auditChanges).
References SpringBone(), and ES_COMPONENT.
| std::vector<Entity> esengine::ecs::SpringBone::colliders |
Entities with a SpringBoneCollider this chain keeps out of.
Definition at line 80 of file SpringBone.hpp.
Referenced by springboneApplyJS(), and springboneToJS().
| f32 esengine::ecs::SpringBone::drag {0.5f} |
How much of its velocity a bone loses each frame, 0 to 1.
Definition at line 48 of file SpringBone.hpp.
Referenced by springboneApplyJS(), and springboneToJS().
| bool esengine::ecs::SpringBone::enabled {true} |
Simulated this frame. Off leaves the chain exactly as the animation poses it.
Definition at line 40 of file SpringBone.hpp.
Referenced by springboneApplyJS(), and springboneToJS().
| f32 esengine::ecs::SpringBone::endLength {0.0f} |
How far the last bones of a chain reach past themselves, in world units: a leaf has no child to aim at, so this gives it a tip. 0 leaves leaves unsimulated.
Definition at line 68 of file SpringBone.hpp.
Referenced by springboneApplyJS(), and springboneToJS().
| glm::vec3 esengine::ecs::SpringBone::gravity {0.0f, -980.0f, 0.0f} |
Gravity on the chain, in world units a second squared.
Definition at line 52 of file SpringBone.hpp.
Referenced by springboneApplyJS(), and springboneToJS().
| f32 esengine::ecs::SpringBone::radius {0.0f} |
The thickness of the strand, in world units, kept clear of every collider.
Definition at line 72 of file SpringBone.hpp.
Referenced by springboneApplyJS(), and springboneToJS().
| f32 esengine::ecs::SpringBone::stiffness {0.1f} |
How hard each bone is pulled back toward the pose the animation gives it, 0 to 1.
Definition at line 44 of file SpringBone.hpp.
Referenced by springboneApplyJS(), and springboneToJS().
| f32 esengine::ecs::SpringBone::weight {1.0f} |
How much of the simulated pose is used, 0 to 1: 0 is the animation alone.
Definition at line 76 of file SpringBone.hpp.
Referenced by springboneApplyJS(), and springboneToJS().
| glm::vec3 esengine::ecs::SpringBone::wind {0.0f, 0.0f, 0.0f} |
A steady wind on the chain, in world units a second squared.
Definition at line 56 of file SpringBone.hpp.
Referenced by springboneApplyJS(), and springboneToJS().
| f32 esengine::ecs::SpringBone::windFrequency {0.5f} |
Gusts a second.
Definition at line 64 of file SpringBone.hpp.
Referenced by springboneApplyJS(), and springboneToJS().
| f32 esengine::ecs::SpringBone::windGust {0.0f} |
How far gusts swing the wind's strength, 0 to 1.
Definition at line 60 of file SpringBone.hpp.
Referenced by springboneApplyJS(), and springboneToJS().