Skylicht Engine
Loading...
Searching...
No Matches
Skylicht::CGameObject Class Reference

This object class stores information for a GameObject. More...

#include <GameObject/CGameObject.h>

Inheritance diagram for Skylicht::CGameObject:
Skylicht::CContainerObject Skylicht::CZone

Public Member Functions

 CGameObject (CGameObject *parent, CZone *zone)
CEntitycreateEntity ()
void destroyEntity ()
void updateEntityParent ()
virtual void setID (const char *id)
std::string & getID ()
const wchar_t * getName ()
const char * getNameA ()
const wchar_t * getDefaultName ()
void setName (const wchar_t *lpName)
void setName (const char *lpName)
bool isTemplateAsset ()
const char * getTemplateAsset ()
void setTemplateAsset (const char *asset)
void unpackTemplate ()
const char * getTemplateID ()
void setTemplateID (const char *id)
const char * getTemplateObjectID ()
void setTemplateObjectID (const char *id)
bool isTemplateObject ()
CGameObject * getParentTemplate ()
virtual void setTemplateChanged (bool b)
bool isTemplateChanged ()
CGameObject * getParent ()
CZonegetZone ()
CScenegetScene ()
void setParent (CGameObject *p)
CEntitygetEntity ()
CEntityManagergetEntityManager ()
CTransformgetTransform ()
CTransformEulergetTransformEuler ()
CTransformMatrixgetTransformMatrix ()
void setupMatrixTransform ()
void setupEulerTransform ()
core::vector3df getPosition ()
core::quaternion getRotation ()
core::vector3df getUp ()
core::vector3df getFront ()
const core::matrix4getWorldTransform ()
core::matrix4 calcWorldTransform ()
bool isEnable ()
bool isEnableEndUpdate ()
bool isVisible ()
bool isLock ()
bool isSelfLock ()
virtual void setEnable (bool b)
virtual void setEnableEndUpdate (bool b)
virtual void setStatic (bool b)
virtual bool isStatic ()
void setLock (bool b)
virtual void setVisible (bool b)
bool isContainer ()
void setCullingLayer (u32 layer)
void setCullingLayerOnOff (u32 value, bool on)
u32 getCullingLayer ()
void setEditorObject (bool b)
bool isEditorObject ()
void tagData (void *data)
void tagData (int data)
void tagData (std::string &s)
void * getTagData ()
int getTagDataInt ()
const char * getTagDataString ()
virtual void updateObject ()
virtual void endUpdate ()
virtual void remove ()
template<class T>
T * addComponent ()
template<class T>
T * getComponent ()
template<class T>
bool removeComponent ()
bool removeComponent (CComponentSystem *comp)
void releaseAllComponent ()
CComponentSystemaddComponentByTypeName (const char *name)
CComponentSystemgetComponentByTypeName (const char *name)
std::vector< CComponentSystem * > & getListComponent ()
int getComponentPosition (CComponentSystem *comp)
int getComponentCount ()
CComponentSystemgetComponentByPos (int i)
void moveComponentUp (CComponentSystem *comp)
void moveComponentDown (CComponentSystem *comp)
int getSerializableComponentCount ()
void moveSerializableComponentUp (CComponentSystem *comp)
void moveSerializableComponentDown (CComponentSystem *comp)
void sortComponent (std::vector< std::string > &templateOrder)
void enableEditorChange (bool b)
void enableEditorSelect (bool b)
bool isEnableEditorChange ()
bool isEnableEditorSelect ()
void startComponent ()
CObjectSerializablecreateSerializable ()
void loadSerializable (CObjectSerializable *object)

Protected Member Functions

void initNull ()

Protected Attributes

std::string m_objectID
std::wstring m_name
std::wstring m_defaultName
std::string m_namec
bool m_static
bool m_enable
bool m_visible
bool m_lock
bool m_isContainer
bool m_editorObject
bool m_enableEditorChange
bool m_enableEditorSelect
bool m_enableEndUpdate
u32 m_cullingLayer
CEntitym_entity
CGameObject * m_parent
CZonem_zone
void * m_tagData
int m_tagDataInt
std::string m_tagDataString
std::vector< CComponentSystem * > m_components
CTransformm_transform
CTransformEulerm_transformEuler
CTransformMatrixm_transformMatrix
std::string m_templateId
std::string m_templateAsset
std::string m_templateObjectId
bool m_templateChanged

Friends

class CDependentComponent

Detailed Description

This object class stores information for a GameObject.

A GameObject can contain multiple Components, such as RenderMesh, Camera, or Collider...

The image shows a scene's structure featuring many GameObjects

Creating an object automatically creates an associated entity (CEntity) to store relevant data (IEntityData) like its position, visibility, and more. When components are initialized, they'll continue to add data to this entity.


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