27#include "CPrimiviteData.h"
28#include "Entity/CEntityHandler.h"
29#include "RenderMesh/CMesh.h"
55 class COMPONENT_API CPrimitive :
public CEntityHandler
58 CPrimiviteData::EPrimitive m_type;
64 bool m_useCustomMaterial;
72 std::string m_materialPath;
78 virtual ~CPrimitive();
80 virtual void initComponent();
164 return m_useNormalMap;
This is the object class that describes an entity.
Definition CEntity.h:58
The object class describes material information such as which shader it's associated with,...
Definition CMaterial.h:84
Definition CObjectSerializable.h:36
Base class for primitive shape components (Cube, Sphere, Plane). Supports multi-instance rendering wi...
Definition CPrimitive.h:56
CPrimiviteData::EPrimitive getType()
Get the primitive type.
Definition CPrimitive.h:171
void setColor(const SColor &color)
Set the default material color.
void setCustomMaterial(CMaterial *material)
Set a custom material for all instances.
void setEnableNormalMap(bool b)
Enable or disable normal map support (uses tangent vertices).
Definition CPrimitive.h:153
void setInstancing(bool b)
Enable or disable hardware instancing.
CMesh * getMesh()
Get the internal mesh used for rendering.
CEntity * addPrimitive(const core::vector3df &pos, const core::vector3df &rotDeg, const core::vector3df &scale)
Add a primitive instance to this component.
bool isUseNormalMap()
Check if normal map is enabled.
Definition CPrimitive.h:162
bool isInstancing()
Check if hardware instancing is enabled.
Definition CPrimitive.h:144
const SColor & getColor()
Get the default material color.
Definition CPrimitive.h:117
CMaterial * getMaterial()
Get the active material.
Class representing a 32 bit ARGB color.
Definition SColor.h:285
Everything in the Skylicht Engine. You can start by looking at the topics.
Definition AudioDebugLog.h:29
vector3d< f32 > vector3df
Typedef for a f32 3d vector.
Definition vector3d.h:445