supertux
Classes | Public Member Functions | List of all members
CollisionSystem Class Referencefinal

Classes

struct  RaycastResult
 

Public Member Functions

 CollisionSystem (Sector &sector)
 
void add (CollisionObject *object)
 
void remove (CollisionObject *object)
 
void draw (DrawingContext &context)
 Draw collision shapes for debugging.
 
void update ()
 Checks for all possible collisions. More...
 
const std::shared_ptr< CollisionGroundMovementManager > & get_ground_movement_manager ()
 
bool is_free_of_tiles (const Rectf &rect, const bool ignoreUnisolid=false, uint32_t tiletype=Tile::SOLID) const
 
bool is_free_of_statics (const Rectf &rect, const CollisionObject *ignore_object, const bool ignoreUnisolid) const
 
bool is_free_of_movingstatics (const Rectf &rect, const CollisionObject *ignore_object) const
 
bool is_free_of_specifically_movingstatics (const Rectf &rect, const CollisionObject *ignore_object) const
 
RaycastResult get_first_line_intersection (const Vector &line_start, const Vector &line_end, bool ignore_objects, const CollisionObject *ignore_object) const
 
bool free_line_of_sight (const Vector &line_start, const Vector &line_end, bool ignore_objects, const CollisionObject *ignore_object) const
 
std::vector< CollisionObject * > get_nearby_objects (const Vector &center, float max_distance) const
 

Member Function Documentation

◆ update()

void CollisionSystem::update ( )

Checks for all possible collisions.

And calls the collision_handlers, which the collision_objects provide for this case (or not).


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