viotecs 1.0
Loading...
Searching...
No Matches
viotecs::component Struct Reference

Component class. More...

#include <component.hpp>

Public Member Functions

bool operator== (const component &other) const
 

Data Fields

entity_t 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 transform_component : component {
glm::vec3 position;
glm::vec3 rotation;
float scale;
transform_component() : ...
transform_component(glm::vec3 position, ...
};
Component class.
Definition component.hpp:58

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

Definition at line 57 of file component.hpp.

Member Function Documentation

◆ operator==()

bool viotecs::component::operator== ( const component & other) const
inline

Definition at line 61 of file component.hpp.

Field Documentation

◆ entity

entity_t viotecs::component::entity

Definition at line 59 of file component.hpp.


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