|
hx3d
1
2D/3D Simple Game Framework
|
Point attractor. More...
#include <point_attractor.hpp>
Public Member Functions | |
| virtual bool | overlaps (const Ptr< Collider > &collider) override |
| Check if a collider overlaps the attractor. More... | |
| virtual void | computeForce (const Ptr< Collider > &collider, const float dt) override |
| Compute the gravity force on a collider. More... | |
Public Member Functions inherited from hx3d::physics2d::Attractor | |
| Attractor (Type type) | |
| Create an attractor. More... | |
Public Attributes | |
| glm::vec2 | position |
| Point position. | |
| glm::vec2 | velocity |
| Point velocity. | |
| float | radius |
| Point radius. | |
Public Attributes inherited from hx3d::physics2d::Attractor | |
| Type | type |
| Attractor type. | |
| unsigned int | priority |
| Attractor priority. | |
Additional Inherited Members | |
Public Types inherited from hx3d::physics2d::Attractor | |
Static Public Member Functions inherited from hx3d::physics2d::Attractor | |
| static void | setCurrentAttractor (const Ptr< Collider > &collider, const Ptr< Attractor > &attractor, const float dt) |
| Defines the current attractor on a collider. More... | |
| static void | applyForce (const Ptr< Collider > &collider, const Ptr< Attractor > &attractor, const float dt) |
| Apply an attractor force on a collider. More... | |
Point attractor.
Definition at line 32 of file point_attractor.hpp.
|
overridevirtual |
Compute the gravity force on a collider.
| collider | Collider (Ptr) |
| dt | Delta time |
Implements hx3d::physics2d::Attractor.
Definition at line 23 of file point_attractor.cpp.
Check if a collider overlaps the attractor.
| collider | Collider (Ptr) |
Implements hx3d::physics2d::Attractor.
Definition at line 15 of file point_attractor.cpp.
1.8.11