The Joe Engine
Joe's engine programming playground
RotatorComponent Class Reference

The Rotator Component class. More...

#include <RotatorComponent.h>

Public Member Functions

 RotatorComponent ()
 Constructor. More...
 
 ~RotatorComponent ()=default
 Destructor (default). More...
 
void Update (JoeEngine::JEEngineInstance *engineInstance)
 Update this rotator component. More...
 

Public Attributes

int m_entityId
 Entity Id. More...
 
glm::vec3 m_axis
 Axis of rotation. More...
 

Detailed Description

The Rotator Component class.

A custom-made component type. Note that it exists outside of the usual JoeEngine namespace.\ When attached to an entity, the entity should rotate about a specified axis.

See also
RotatorComponentManager

Constructor & Destructor Documentation

◆ RotatorComponent()

RotatorComponent::RotatorComponent ( )
inline

Constructor.

Constructs a rotator component with default values.

◆ ~RotatorComponent()

RotatorComponent::~RotatorComponent ( )
default

Destructor (default).

Member Function Documentation

◆ Update()

void RotatorComponent::Update ( JoeEngine::JEEngineInstance engineInstance)

Update this rotator component.

A user-defined function that should invoke some custom functionality. In this case, it should transform the attached entity (stored in m_entityId) by rotating it about m_axis.

Parameters
engineInstancethe engine instance (needed for general API calls).

Member Data Documentation

◆ m_axis

glm::vec3 RotatorComponent::m_axis

Axis of rotation.

Indicates which axis to rotate about.

◆ m_entityId

int RotatorComponent::m_entityId

Entity Id.

Indicates which entity this component is attached to.


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