neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
neogfx::game::collision_detector Class Reference

#include <collision_detector.hpp>

Inheritance diagram for neogfx::game::collision_detector:
neolib::ecs::system< entity_info, box_collider, box_collider_2d > neolib::ecs::i_system

Classes

struct  meta
 

Public Member Functions

define_event(Collision, collision, entity_id, entity_id) public ~collision_detector ()
 
const system_idid () const override
 
const i_stringname () const override
 
std::optional< entity_identity_at (const vec3 &aPoint) const
 
bool apply () override
 
void run_cycle (collision_detection_cycle aCycle=collision_detection_cycle::Default)
 
template<typename Visitor >
void visit_aabbs (const Visitor &aVisitor) const
 
template<typename Visitor >
void visit_aabbs_2d (const Visitor &aVisitor) const
 
const aabb_octree< box_collider > & broadphase_tree () const
 
const aabb_quadtree< box_collider_2d > & broadphase_2d_tree () const
 
- Public Member Functions inherited from neolib::ecs::system< entity_info, box_collider, box_collider_2d >
 system (i_ecs &aEcs)
 
 system (const system &aOther)
 
 system (system &&aOther)
 
 system (i_ecs &aEcs, ComponentIdIter aFirstComponent, ComponentIdIter aLastComponent)
 
 ~system ()
 
i_ecsecs () const override
 
const i_set< component_id > & components () const override
 
i_set< component_id > & components () override
 
const i_componentcomponent (component_id aComponentId) const override
 
i_componentcomponent (component_id aComponentId) override
 
bool can_apply () const override
 
bool paused () const override
 
void pause () override
 
void resume () override
 
void terminate () override
 
bool waiting () const override
 
void wait () override
 
void wait_for (scalar aDuration) override
 
void signal () override
 
void start_thread_if () override
 
void start_thread () override
 
bool debug () const override
 
void set_debug (bool aDebug) override
 
std::chrono::microseconds update_time (std::size_t aMetricsIndex=0) const override
 
- Public Member Functions inherited from neolib::ecs::i_system
virtual ~i_system ()=default
 

Additional Inherited Members

- Protected Member Functions inherited from neolib::ecs::system< entity_info, box_collider, box_collider_2d >
bool have_thread () const
 
threadget_thread () const
 
void yield (bool aSleep=false)
 
std::mutex & waiting_mutex ()
 
void start_update (std::size_t aMetricsIndex=0)
 
void end_update (std::size_t aMetricsIndex=0)
 

Detailed Description

Definition at line 53 of file collision_detector.hpp.

Constructor & Destructor Documentation

◆ ~collision_detector()

define_event(Collision, collision, entity_id, entity_id) public neogfx::game::collision_detector::~collision_detector ( )

Member Function Documentation

◆ apply()

bool neogfx::game::collision_detector::apply ( )
overridevirtual

Implements neolib::ecs::i_system.

◆ broadphase_2d_tree()

const aabb_quadtree< box_collider_2d > & neogfx::game::collision_detector::broadphase_2d_tree ( ) const

◆ broadphase_tree()

const aabb_octree< box_collider > & neogfx::game::collision_detector::broadphase_tree ( ) const

◆ entity_at()

std::optional< entity_id > neogfx::game::collision_detector::entity_at ( const vec3 aPoint) const

◆ id()

const system_id & neogfx::game::collision_detector::id ( ) const
overridevirtual

Implements neolib::ecs::i_system.

◆ name()

const i_string & neogfx::game::collision_detector::name ( ) const
overridevirtual

Implements neolib::ecs::i_system.

◆ run_cycle()

void neogfx::game::collision_detector::run_cycle ( collision_detection_cycle  aCycle = collision_detection_cycle::Default)

◆ visit_aabbs()

template<typename Visitor >
void neogfx::game::collision_detector::visit_aabbs ( const Visitor &  aVisitor) const
inline

Definition at line 70 of file collision_detector.hpp.

◆ visit_aabbs_2d()

template<typename Visitor >
void neogfx::game::collision_detector::visit_aabbs_2d ( const Visitor &  aVisitor) const
inline

Definition at line 75 of file collision_detector.hpp.


The documentation for this class was generated from the following file: