Brenta Engine 1.0
Loading...
Searching...
No Matches
Brenta::ECS::Component Struct Reference

Component class. More...

#include <component.hpp>

Public Member Functions

bool operator== (const Component &other) const
 

Data Fields

Entity entity
 

Detailed Description

Component class.

This class is used to create components. Components are used to store data that is associated with an entity. For example, a Position component could store the position of the entity.

Example creating a component:

struct TransformComponent : Component {
glm::vec3 position;
glm::vec3 rotation;
float scale;
TransformComponent() : ...
TransformComponent(glm::vec3 position, ...
};
Component class.
Definition component.hpp:61

You need to provide a default constructor, any other constructor is optional.

Definition at line 60 of file component.hpp.

Member Function Documentation

◆ operator==()

bool Brenta::ECS::Component::operator== ( const Component & other) const
inline

Definition at line 64 of file component.hpp.

Field Documentation

◆ entity

Entity Brenta::ECS::Component::entity

Definition at line 62 of file component.hpp.


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