Public Member Functions | Public Attributes | List of all members
RotateComponentInstance Class Reference

#include <rotatecomponent.h>

Public Member Functions

 RotateComponentInstance (EntityInstance &entity, Component &resource)
virtual bool init (utility::ErrorState &errorState) override
virtual void update (double deltaTime) override
void reset ()
- Public Member Functions inherited from ComponentInstance
 ComponentInstance (EntityInstance &entity, Component &resource)
nap::EntityInstancegetEntityInstance () const
nap::ComponentgetComponent () const
template<typename T >
T * getComponent () const
- Public Member Functions inherited from Object
 Object ()
virtual ~Object ()
virtual void onDestroy ()
 Object (Object &)=delete
Objectoperator= (const Object &)=delete
 Object (Object &&)=delete
Objectoperator= (Object &&)=delete

Public Attributes

RotateProperties mProperties
- Public Attributes inherited from Object
std::string mID
 Property: 'mID' unique name of the object. Used as an identifier by the system. More...

Additional Inherited Members

- Static Public Member Functions inherited from Object
static bool isIDProperty (rtti::Instance &object, const rtti::Property &property)


Instance part of the rotate component. Automatically rotates the entity along a certain axis at a certain speed. The initial rotation value after initialization is used to rotate along the specified axis. This component updates (overrides) the rotate value of the transform component. Entities that use this component must have a transform.

Inheritance diagram for RotateComponentInstance:
Collaboration diagram for RotateComponentInstance:

Constructor & Destructor Documentation

◆ RotateComponentInstance()

RotateComponentInstance ( EntityInstance entity,
Component resource 

Member Function Documentation

◆ init()

virtual bool init ( utility::ErrorState errorState)

Initialize this rotate component, copies it's members over and validates if a transform component is available that can be rotated.

errorStatecontains the error if initialization fails.

Reimplemented from ComponentInstance.

◆ reset()

void reset ( )

Resets rotation to be 0

◆ update()

virtual void update ( double  deltaTime)

Rotates the component every tick based on the speed and exis

deltaTimetime it took to complete last cook (seconds)

Reimplemented from ComponentInstance.

Member Data Documentation

◆ mProperties

RotateProperties mProperties