Skylicht Engine
Toggle main menu visibility
Loading...
Searching...
No Matches
Primitive
CLathe.h
1
#pragma once
2
3
#include "LatheMesh/CLatheMesh.h"
4
#include "Material/CMaterial.h"
5
6
namespace
Skylicht
7
{
12
class
COMPONENT_API CLathe :
public
CComponentSystem
13
{
14
protected
:
15
CMaterial
* m_material;
16
CMaterial
* m_customMaterial;
17
18
bool
m_shadowCasting;
19
bool
m_useCustomMaterial;
20
bool
m_useNormalMap;
21
22
std::string m_materialPath;
23
SColor
m_color;
24
25
bool
m_needReinit;
26
public
:
27
CLathe();
28
29
virtual
~CLathe();
30
31
virtual
void
initComponent();
32
33
virtual
void
updateComponent();
34
38
virtual
void
init
() = 0;
39
44
CMesh
*
getMesh
();
45
50
inline
CMaterial
*
getMaterial
()
51
{
52
return
m_material;
53
}
54
59
inline
const
SColor
&
getColor
()
60
{
61
return
m_color;
62
}
63
68
void
setColor
(
const
SColor
& color);
69
74
void
setShadowCasting
(
bool
b);
75
80
inline
bool
isShadowCasting
()
81
{
82
return
m_shadowCasting;
83
}
84
85
virtual
CObjectSerializable
* createSerializable();
86
87
virtual
void
loadSerializable(
CObjectSerializable
*
object
);
88
89
DECLARE_GETTYPENAME(
CLathe
)
90
91
protected
:
92
97
void
initMesh
(
CLatheMesh
* mesh);
98
};
99
}
Skylicht::CLathe
Base class for rotational (lathe) primitive components like Capsules and Cylinders.
Definition
CLathe.h:13
Skylicht::CLathe::setShadowCasting
void setShadowCasting(bool b)
Enable or disable shadow casting for this object.
Skylicht::CLathe::isShadowCasting
bool isShadowCasting()
Check if shadow casting is enabled.
Definition
CLathe.h:80
Skylicht::CLathe::setColor
void setColor(const SColor &color)
Set the default material color.
Skylicht::CLathe::getMesh
CMesh * getMesh()
Get the generated mesh.
Skylicht::CLathe::getMaterial
CMaterial * getMaterial()
Get the default material.
Definition
CLathe.h:50
Skylicht::CLathe::initMesh
void initMesh(CLatheMesh *mesh)
Initialize the render mesh and culling data for the component's entity.
Skylicht::CLathe::getColor
const SColor & getColor()
Get the default material color.
Definition
CLathe.h:59
Skylicht::CLathe::init
virtual void init()=0
Re-initialize the lathe mesh based on current parameters.
Skylicht::CLatheMesh
Base class for procedurally generating lathe-based meshes (rotational geometry).
Definition
CLatheMesh.h:15
Skylicht::CMaterial
The object class describes material information such as which shader it's associated with,...
Definition
CMaterial.h:84
Skylicht::CMesh
Definition
CMesh.h:75
Skylicht::CObjectSerializable
Definition
CObjectSerializable.h:36
irr::video::SColor
Class representing a 32 bit ARGB color.
Definition
SColor.h:285
Skylicht
Everything in the Skylicht Engine. You can start by looking at the topics.
Definition
AudioDebugLog.h:29
Generated by
1.17.0