Aether3D Game Engine
Classes | Public Member Functions | Static Public Attributes | List of all members
ae3d::GameObject Class Reference

GameObject is composed of components that define its behavior. More...

#include <GameObject.hpp>

Public Member Functions

template<class T >
void AddComponent ()
 Adds a component into the game object. There can be multiple components of the same type.
 
template<class T >
void RemoveComponent ()
 Remove a component from the game object.
 
template<class T >
T * GetComponent () const
 
 GameObject ()=default
 Constructor.
 
 GameObject (const GameObject &other)
 Copy constructor.
 
GameObjectoperator= (const GameObject &go)
 
void SetName (const char *aName)
 
const std::string & GetName () const
 
std::string GetSerialized () const
 

Static Public Attributes

static const unsigned InvalidComponentIndex = 99999999
 Invalid component index.
 

Detailed Description

GameObject is composed of components that define its behavior.

Member Function Documentation

template<class T >
T* ae3d::GameObject::GetComponent ( ) const
inline
Returns
The first component of type T or null if there is no such component.
const std::string& ae3d::GameObject::GetName ( ) const
inline
Returns
Game Object's name.
std::string ae3d::GameObject::GetSerialized ( ) const
Returns
Game Object's contents excluding components
GameObject& ae3d::GameObject::operator= ( const GameObject go)
Parameters
goOther game object.
void ae3d::GameObject::SetName ( const char *  aName)
inline
Parameters
aNameGame Object's name.

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