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

Component for rendering cube primitives. More...

#include <Primitive/CCube.h>

Inheritance diagram for Skylicht::CCube:
Skylicht::CPrimitive Skylicht::CEntityHandler Skylicht::CComponentSystem Skylicht::IActivatorObject

Public Member Functions

virtual void initComponent ()
virtual void updateComponent ()
Public Member Functions inherited from Skylicht::CPrimitive
CEntityaddPrimitive (const core::vector3df &pos, const core::vector3df &rotDeg, const core::vector3df &scale)
 Add a primitive instance to this component.
CMaterialgetMaterial ()
 Get the active material.
CMeshgetMesh ()
 Get the internal mesh used for rendering.
const SColorgetColor ()
 Get the default material color.
void setColor (const SColor &color)
 Set the default material color.
void setCustomMaterial (CMaterial *material)
 Set a custom material for all instances.
void setInstancing (bool b)
 Enable or disable hardware instancing.
bool isInstancing ()
 Check if hardware instancing is enabled.
void setEnableNormalMap (bool b)
 Enable or disable normal map support (uses tangent vertices).
bool isUseNormalMap ()
 Check if normal map is enabled.
CPrimiviteData::EPrimitive getType ()
 Get the primitive type.
Public Member Functions inherited from Skylicht::CEntityHandler
virtual void onUpdateCullingLayer (u32 mask)
CEntitysearchEntityByID (const char *id)
virtual CEntitycreateEntity ()
virtual CEntitycreateEntity (CEntity *parent)
virtual void removeEntity (CEntity *entity)
virtual void removeAllEntities ()
void regenerateEntityId ()
core::array< CEntity * > & getEntities ()
int getEntityCount ()
void getEntitiesTransforms (core::array< core::matrix4 > &result)
void setShadowCasting (bool b)
bool isShadowCasting ()
Public Member Functions inherited from Skylicht::CComponentSystem
const char * getName ()
virtual void reset ()
virtual void startComponent ()
virtual void endUpdate ()
virtual void onEnable (bool b)
void setEnable (bool b)
bool isEnable ()
CGameObject * getGameObject ()
void setEnableSerializable (bool b)
bool isSerializable ()
void addLinkComponent (CComponentSystem *comp)
void removeAllLink ()
Public Member Functions inherited from Skylicht::IActivatorObject
virtual ~IActivatorObject ()
 Virtual destructor for polymorphic activator objects.

Additional Inherited Members

Static Public Member Functions inherited from Skylicht::CComponentSystem
static int useComponent (CComponentSystem *used)
Protected Member Functions inherited from Skylicht::CPrimitive
virtual CObjectSerializablecreateSerializable ()
virtual void loadSerializable (CObjectSerializable *object)
virtual CEntityspawn ()
Protected Member Functions inherited from Skylicht::CEntityHandler
void setEntities (CEntity **entities, u32 count)
void removeChilds (CEntity *entity)
Protected Member Functions inherited from Skylicht::CComponentSystem
void setOwner (CGameObject *obj)
Protected Attributes inherited from Skylicht::CPrimitive
CPrimiviteData::EPrimitive m_type
SColor m_color
bool m_instancing
bool m_useCustomMaterial
bool m_useNormalMap
CMaterialm_material
CMaterialm_customMaterial
std::string m_materialPath
Protected Attributes inherited from Skylicht::CEntityHandler
core::array< CEntity * > m_entities
bool m_shadowCasting
Protected Attributes inherited from Skylicht::CComponentSystem
CGameObject * m_gameObject
bool m_enable
bool m_serializable
std::vector< CComponentSystem * > m_linkComponent

Detailed Description

Component for rendering cube primitives.

Example

CGameObject* cubeObj = zone->createEmptyObject();
CCube* cube = cubeObj->addComponent<CCube>();
cube->setColor(SColor(255, 255, 0, 0)); // Set color to red
This object class stores information for a GameObject.
Definition CGameObject.h:52
void setColor(const SColor &color)
Set the default material color.
Class representing a 32 bit ARGB color.
Definition SColor.h:285

Member Function Documentation

◆ initComponent()

virtual void Skylicht::CCube::initComponent ( )
virtual

Reimplemented from Skylicht::CPrimitive.

◆ updateComponent()

virtual void Skylicht::CCube::updateComponent ( )
virtual

Reimplemented from Skylicht::CEntityHandler.


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