#include <SphereLink.hh>
One link in a chain where each link's position is limited by the other links.
Definition at line 8 of file SphereLink.hh.
Public Member Functions | |
| void | initLinkLen (f32 length) |
| void | init () |
| void | calcStiffness () |
| void | calc () |
| void | calcConstraints (f32 scale) |
| void | checkCollision () |
| void | calcPos () |
| bool | isLeader () const |
Setters | |
| void | setPrev (SphereLink *prev) |
| void | setNext (SphereLink *next) |
| void | setPos (const EGG::Vector3f &pos) |
| void | setVel (const EGG::Vector3f &vel) |
| void | addSpringForce (const EGG::Vector3f &force) |
Getters | |
| f32 | linkLen () const |
| const EGG::Vector3f & | pos () const |
| const EGG::Vector3f & | up () const |
| static constexpr const EGG::Vector3f & | Gravity () |
Private Member Functions | |
| void | calcSpring () |
Private Attributes | |
| SphereLink * | m_prev |
| SphereLink * | m_next |
| f32 | m_linkLen |
| The maximum distance between this link and the previous (forward) link. | |
| EGG::Vector3f | m_pos |
| EGG::Vector3f | m_vel |
| EGG::Vector3f | m_springForce |
| Prevents links from stretching past their m_linkLen. | |
| EGG::Vector3f | m_up |
| bool | m_touchingGround |
Static Private Attributes | |
| static constexpr EGG::Vector3f | GRAVITY = EGG::Vector3f(0.0f, 2.5f, 0.0f) |
| Field::SphereLink::SphereLink | ( | ) |
Definition at line 7 of file SphereLink.cc.
|
inline |
Definition at line 42 of file SphereLink.hh.
|
0x806F1A54 |
Definition at line 51 of file SphereLink.cc.
|
0x806F2490 |
Definition at line 72 of file SphereLink.cc.
| void Field::SphereLink::calcPos | ( | ) |
Definition at line 153 of file SphereLink.cc.
|
private0x806F1C58 |
Definition at line 161 of file SphereLink.cc.
|
0x806F2074 |
Definition at line 26 of file SphereLink.cc.
|
0x806F2A38 |
Definition at line 116 of file SphereLink.cc.
|
inlinestaticnodiscardconstexpr |
Definition at line 60 of file SphereLink.hh.
| void Field::SphereLink::init | ( | ) |
Definition at line 17 of file SphereLink.cc.
|
0x806F1194 |
Definition at line 12 of file SphereLink.cc.
|
inlinenodiscard |
Definition at line 21 of file SphereLink.hh.
|
inlinenodiscard |
Definition at line 48 of file SphereLink.hh.
|
inlinenodiscard |
Definition at line 52 of file SphereLink.hh.
|
inline |
Definition at line 30 of file SphereLink.hh.
|
inline |
Definition at line 34 of file SphereLink.hh.
|
inline |
Definition at line 26 of file SphereLink.hh.
|
inline |
Definition at line 38 of file SphereLink.hh.
|
inlinenodiscard |
Definition at line 56 of file SphereLink.hh.
|
staticconstexprprivate |
Definition at line 77 of file SphereLink.hh.
|
private |
The maximum distance between this link and the previous (forward) link.
Definition at line 70 of file SphereLink.hh.
|
private |
Definition at line 69 of file SphereLink.hh.
|
private |
Definition at line 71 of file SphereLink.hh.
|
private |
Definition at line 68 of file SphereLink.hh.
|
private |
Prevents links from stretching past their m_linkLen.
Definition at line 73 of file SphereLink.hh.
|
private |
Definition at line 75 of file SphereLink.hh.
|
private |
Definition at line 74 of file SphereLink.hh.
|
private |
Definition at line 72 of file SphereLink.hh.