Skylicht Engine
Loading...
Searching...
No Matches
Skylicht::CLathe Class Referenceabstract

Base class for rotational (lathe) primitive components like Capsules and Cylinders. More...

#include <Primitive/CLathe.h>

Inheritance diagram for Skylicht::CLathe:
Skylicht::CComponentSystem Skylicht::IActivatorObject Skylicht::CCapsule Skylicht::CCylinder

Public Member Functions

virtual void initComponent ()
virtual void updateComponent ()
virtual void init ()=0
 Re-initialize the lathe mesh based on current parameters.
CMeshgetMesh ()
 Get the generated mesh.
CMaterialgetMaterial ()
 Get the default material.
const SColorgetColor ()
 Get the default material color.
void setColor (const SColor &color)
 Set the default material color.
void setShadowCasting (bool b)
 Enable or disable shadow casting for this object.
bool isShadowCasting ()
 Check if shadow casting is enabled.
virtual CObjectSerializablecreateSerializable ()
virtual void loadSerializable (CObjectSerializable *object)
Public Member Functions inherited from Skylicht::CComponentSystem
const char * getName ()
virtual void reset ()
virtual void startComponent ()
virtual void endUpdate ()
virtual void onEnable (bool b)
virtual void onUpdateCullingLayer (u32 mask)
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.

Protected Member Functions

void initMesh (CLatheMesh *mesh)
 Initialize the render mesh and culling data for the component's entity.
Protected Member Functions inherited from Skylicht::CComponentSystem
void setOwner (CGameObject *obj)

Protected Attributes

CMaterialm_material
CMaterialm_customMaterial
bool m_shadowCasting
bool m_useCustomMaterial
bool m_useNormalMap
std::string m_materialPath
SColor m_color
bool m_needReinit
Protected Attributes inherited from Skylicht::CComponentSystem
CGameObject * m_gameObject
bool m_enable
bool m_serializable
std::vector< CComponentSystem * > m_linkComponent

Additional Inherited Members

Static Public Member Functions inherited from Skylicht::CComponentSystem
static int useComponent (CComponentSystem *used)

Detailed Description

Base class for rotational (lathe) primitive components like Capsules and Cylinders.

Member Function Documentation

◆ createSerializable()

virtual CObjectSerializable * Skylicht::CLathe::createSerializable ( )
virtual

Reimplemented from Skylicht::CComponentSystem.

◆ getColor()

const SColor & Skylicht::CLathe::getColor ( )
inline

Get the default material color.

Returns
SColor value.

◆ getMaterial()

CMaterial * Skylicht::CLathe::getMaterial ( )
inline

Get the default material.

Returns
Pointer to CMaterial.

◆ getMesh()

CMesh * Skylicht::CLathe::getMesh ( )

Get the generated mesh.

Returns
Pointer to CMesh.

◆ init()

virtual void Skylicht::CLathe::init ( )
pure virtual

Re-initialize the lathe mesh based on current parameters.

Implemented in Skylicht::CCapsule, and Skylicht::CCylinder.

◆ initComponent()

virtual void Skylicht::CLathe::initComponent ( )
virtual

◆ initMesh()

void Skylicht::CLathe::initMesh ( CLatheMesh * mesh)
protected

Initialize the render mesh and culling data for the component's entity.

Parameters
meshPointer to the CLatheMesh generator.

◆ isShadowCasting()

bool Skylicht::CLathe::isShadowCasting ( )
inline

Check if shadow casting is enabled.

Returns
True if enabled.

◆ loadSerializable()

virtual void Skylicht::CLathe::loadSerializable ( CObjectSerializable * object)
virtual

Reimplemented from Skylicht::CComponentSystem.

◆ setColor()

void Skylicht::CLathe::setColor ( const SColor & color)

Set the default material color.

Parameters
colorNew color.

◆ setShadowCasting()

void Skylicht::CLathe::setShadowCasting ( bool b)

Enable or disable shadow casting for this object.

Parameters
bTrue to cast shadows.

◆ updateComponent()

virtual void Skylicht::CLathe::updateComponent ( )
virtual

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