Skylicht Engine
Loading...
Searching...
No Matches
CRenderLine.h
1#pragma once
2
3#include "Entity/CEntityHandler.h"
4#include "CLineRenderData.h"
5#include "Culling/CCullingBBoxData.h"
6
7namespace Skylicht
8{
9 class COMPONENT_API CRenderLine : public CEntityHandler
10 {
11 protected:
12 CLineRenderData* m_lineData;
13
14 CCullingBBoxData* m_culling;
15
16 float m_lineWidth;
17
18 SColor m_color;
19
20 bool m_billboard;
21
22 bool m_useCustomMaterial;
23
24 std::string m_textureFile;
25
26 std::string m_materialFile;
27
28 CMaterial* m_material;
29
30 CMaterial* m_customMaterial;
31
32 public:
33 CRenderLine();
34
35 virtual ~CRenderLine();
36
37 virtual void initComponent();
38
39 virtual void updateComponent();
40
41 virtual CObjectSerializable* createSerializable();
42
43 virtual void loadSerializable(CObjectSerializable* object);
44
45 virtual CEntity* spawn();
46
47 virtual void removeEntity(CEntity* entity);
48
49 virtual void removeAllEntities();
50
51 DECLARE_GETTYPENAME(CRenderLine)
52
53 void loadCustomMaterial(const char* materialFile);
54
55 void setTextureFile(const char* textureFile);
56
57 void setTexture(ITexture* texture);
58
59 CMaterial* getMaterial();
60
61 inline u32 getNumPoint()
62 {
63 return (u32)m_entities.size();
64 }
65
66 inline CLineRenderData* getLineData()
67 {
68 return m_lineData;
69 }
70
71 CWorldTransformData* getPoint(u32 id);
72
73 void setPoints(const std::vector<core::vector3df>& position);
74
75 void setColor(const SColor& c);
76
77 inline const SColor& getColor()
78 {
79 return m_color;
80 }
81
82 inline void setWidth(float w)
83 {
84 m_lineWidth = w;
85 m_lineData->Width = w;
86 }
87
88 inline float getWidth()
89 {
90 return m_lineWidth;
91 }
92
93 void setBillboard(bool b);
94
95 inline bool isBillboard()
96 {
97 return false;
98 }
99
100 protected:
101
102 void updateData();
103
104 };
105}
Definition CCullingBBoxData.h:33
This is the object class that describes an entity.
Definition CEntity.h:58
Definition CLineRenderData.h:12
The object class describes material information such as which shader it's associated with,...
Definition CMaterial.h:84
Definition CObjectSerializable.h:36
Definition CWorldTransformData.h:32
Interface of a Video Driver dependent Texture.
Definition ITexture.h:119
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
unsigned int u32
32 bit unsigned variable.
Definition irrTypes.h:58