Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
BoundingBox_data Struct Reference

Bounding box component for collision detection. More...

#include <ECS_Components.h>

Public Member Functions

 BoundingBox_data ()=default
 Default constructor.
 
 BoundingBox_data (SDL_FRect rect)
 Construct with bounding box.
 
 BoundingBox_data (const BoundingBox_data &)=default
 Copy constructor.
 
BoundingBox_dataoperator= (const BoundingBox_data &)=default
 Copy assignment operator.
 

Public Attributes

SDL_FRect boundingBox = {0.f, 0.f, 25.f, 25.f}
 Collision rectangle.
 

Detailed Description

Bounding box component for collision detection.

Defines rectangular collision area for the entity.

Definition at line 167 of file ECS_Components.h.

Constructor & Destructor Documentation

◆ BoundingBox_data() [1/3]

BoundingBox_data::BoundingBox_data ( )
default

Default constructor.

◆ BoundingBox_data() [2/3]

BoundingBox_data::BoundingBox_data ( SDL_FRect  rect)
inline

Construct with bounding box.

Parameters
rectSDL rectangle for collision bounds

Definition at line 179 of file ECS_Components.h.

◆ BoundingBox_data() [3/3]

BoundingBox_data::BoundingBox_data ( const BoundingBox_data )
default

Copy constructor.

Member Function Documentation

◆ operator=()

BoundingBox_data & BoundingBox_data::operator= ( const BoundingBox_data )
default

Copy assignment operator.

Member Data Documentation

◆ boundingBox

SDL_FRect BoundingBox_data::boundingBox = {0.f, 0.f, 25.f, 25.f}

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