|
Engine
Frameworkcreatedbymeusableforthecreationofsimplegames.CurrentlysupportsOpenGL(Verysimple)andVulkan.
|
The Collision System handles and stores run-time collision data using the Box2D library More...
#include <CollisionSystem.hpp>
Public Member Functions | |
| ~CollisionSystem () | |
| void | Stop () |
| Stops the Collision System, emptying m_collisionComponents Prevents further calls to Update(). More... | |
| void | Start () |
| Starts the Collision System, gathering all required component data and generating collision bodies from it. Allows further calls to Update(). More... | |
| void | Update () |
| Updates the collision world. Takes transform data of collision components, changes it, and replaces the old transform data with the new data. More... | |
| eastl::weak_ptr< Entity > | RayQueryFirstHit (const glm::vec2 &start, const glm::vec2 &end, CollisionLayer detectionLayers) const |
| Returns the first collision-body hit by the ray. TODO - Implementation More... | |
| eastl::weak_ptr< Entity > | RayQueryAllHit (const glm::vec2 &start, const glm::vec2 &end) const |
| Returns all collision-objects hit by the ray. TODO - Implementation More... | |
| bool | IsRunning () const |
| Returns true if the Collision system is running More... | |
| eastl::vector< eastl::weak_ptr< CollisionComponent > > | GetActiveCollisionComponents () const |
| Gets all of the collision components that are currently active in the world. More... | |
Friends | |
| class | Engine |
| class | CollisionComponent |
The Collision System handles and stores run-time collision data using the Box2D library
Definition at line 22 of file CollisionSystem.hpp.
| Engine::CollisionSystem::~CollisionSystem | ( | ) |
Definition at line 18 of file CollisionSystem.cpp.
| eastl::vector< eastl::weak_ptr< CollisionComponent > > Engine::CollisionSystem::GetActiveCollisionComponents | ( | ) | const |
Gets all of the collision components that are currently active in the world.
Definition at line 136 of file CollisionSystem.cpp.
| bool Engine::CollisionSystem::IsRunning | ( | ) | const |
Returns true if the Collision system is running
Definition at line 131 of file CollisionSystem.cpp.
| eastl::weak_ptr< Entity > Engine::CollisionSystem::RayQueryAllHit | ( | const glm::vec2 & | start, |
| const glm::vec2 & | end | ||
| ) | const |
Returns all collision-objects hit by the ray. TODO - Implementation
| start | The start position of the ray. |
| end | The end position of the ray. |
Definition at line 126 of file CollisionSystem.cpp.
| eastl::weak_ptr< Entity > Engine::CollisionSystem::RayQueryFirstHit | ( | const glm::vec2 & | start, |
| const glm::vec2 & | end, | ||
| CollisionLayer | detectionLayers | ||
| ) | const |
Returns the first collision-body hit by the ray. TODO - Implementation
| start | The start position of the ray. |
| end | The end position of the ray. |
| detectionLayers | The collision layers you want to use. |
Definition at line 109 of file CollisionSystem.cpp.
| void Engine::CollisionSystem::Start | ( | ) |
Starts the Collision System, gathering all required component data and generating collision bodies from it. Allows further calls to Update().
Definition at line 65 of file CollisionSystem.cpp.
| void Engine::CollisionSystem::Stop | ( | ) |
Stops the Collision System, emptying m_collisionComponents Prevents further calls to Update().
Definition at line 59 of file CollisionSystem.cpp.
| void Engine::CollisionSystem::Update | ( | ) |
Updates the collision world. Takes transform data of collision components, changes it, and replaces the old transform data with the new data.
Definition at line 71 of file CollisionSystem.cpp.
|
friend |
Definition at line 32 of file CollisionSystem.hpp.
|
friend |
Definition at line 24 of file CollisionSystem.hpp.
1.8.11