viotecs 1.1.0
Loading...
Searching...
No Matches
viotecs::Component Class Reference

Component class. More...

#include <component.hpp>

Public Member Functions

bool operator== (const Component &other) const
 

Data Fields

EntityId 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:

glm::vec3 position;
glm::vec3 rotation;
float scale;
TransformComponent() : ...
TransformComponent(glm::vec3 position, ...
};
Component class.
Definition component.hpp:37
constexpr TypeId type_id
Definition world.hpp:57

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

Definition at line 36 of file component.hpp.

Member Function Documentation

◆ operator==()

bool viotecs::Component::operator== ( const Component other) const
inline

Definition at line 41 of file component.hpp.

Field Documentation

◆ entity

EntityId viotecs::Component::entity

Definition at line 39 of file component.hpp.


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