Class IEntity

Inheritance Relationships

Base Type

  • public std::enable_shared_from_this< IEntity >

Derived Types

Class Documentation

class IEntity : public std::enable_shared_from_this<IEntity>

Interface for all entities in the Demeter system.

This abstract class defines the basic interface that all entities must implement, including update and draw operations. It inherits from std::enable_shared_from_this to allow entities to create shared_ptr instances to themselves.

Subclassed by E_CameraControler, E_Coms, E_Default, E_Light, E_Mother

Public Functions

virtual ~IEntity() = default
virtual bool Init(Demeter &d) = 0
virtual bool Update(Demeter &d) = 0

Updates the state of the entity.

This pure virtual function must be implemented by derived classes to handle the update of the entity’s state based on the current state of the Demeter instance.

Parameters:

d – Reference to the Demeter instance providing context for the update.

Returns:

true if the update was successful, false otherwise.

virtual bool Draw(Demeter &d) = 0

Draws the entity using the provided Demeter context.

This pure virtual function must be implemented by derived classes to handle the rendering or visualization of the entity within the given Demeter instance.

Parameters:

d – Reference to a Demeter object used for drawing operations.

Returns:

true if the drawing operation was successful, false otherwise.