Skylicht Engine
Loading...
Searching...
No Matches
CGroupMesh.h
1/*
2!@
3MIT License
4
5Copyright (c) 2022 Skylicht Technology CO., LTD
6
7Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
8(the "Software"), to deal in the Software without restriction, including without limitation the Rights to use, copy, modify,
9merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
10subject to the following conditions:
11
12The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
13
14THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
15INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
16IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
17WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19
20This file is part of the "Skylicht Engine".
21https://github.com/skylicht-lab/skylicht-engine
22!#
23*/
24#pragma once
25
26#include "Entity/CEntityGroup.h"
27
28namespace Skylicht
29{
30 class SKYLICHT_API CGroupMesh : public CEntityGroup
31 {
32 protected:
33 CFastArray<CEntity*> m_staticMesh;
34 CFastArray<CEntity*> m_skinnedMesh;
35 CFastArray<CEntity*> m_blendShapeMesh;
36 CFastArray<CEntity*> m_softwareSkinnedMesh;
37 CFastArray<CEntity*> m_hardwareSkinnedMesh;
38 CFastArray<CEntity*> m_instancingMesh;
39 CFastArray<CEntity*> m_skinnedInstancingMesh;
40
41 public:
42 CGroupMesh(CEntityGroup* parent);
43
44 virtual ~CGroupMesh();
45
46 inline int getNumStaticMesh()
47 {
48 return m_staticMesh.count();
49 }
50
51 inline int getNumSkinnedMesh()
52 {
53 return m_skinnedMesh.count();
54 }
55
56 inline int getNumBlendShape()
57 {
58 return m_blendShapeMesh.count();
59 }
60
61 inline int getNumSoftwareSkinnedMesh()
62 {
63 return m_softwareSkinnedMesh.count();
64 }
65
66 inline int getNumHardwareSkinnedMesh()
67 {
68 return m_hardwareSkinnedMesh.count();
69 }
70
71 inline int getNumInstancingMesh()
72 {
73 return m_instancingMesh.count();
74 }
75
76 inline int getNumSkinnedInstancingMesh()
77 {
78 return m_skinnedInstancingMesh.count();
79 }
80
81 inline CEntity** getStaticMeshes()
82 {
83 return m_staticMesh.pointer();
84 }
85
86 inline CEntity** getSkinnedMeshes()
87 {
88 return m_skinnedMesh.pointer();
89 }
90
91 inline CEntity** getBlendShapeMeshes()
92 {
93 return m_blendShapeMesh.pointer();
94 }
95
96 inline CEntity** getSoftwareSkinnedMeshes()
97 {
98 return m_softwareSkinnedMesh.pointer();
99 }
100
101 inline CEntity** getHardwareSkinnedMeshes()
102 {
103 return m_hardwareSkinnedMesh.pointer();
104 }
105
106 inline CEntity** getInstancingMeshes()
107 {
108 return m_instancingMesh.pointer();
109 }
110
111 inline CEntity** getSkinnedInstancingMeshes()
112 {
113 return m_skinnedInstancingMesh.pointer();
114 }
115
116 virtual void onQuery(CEntityManager* entityManager, CEntity** entities, int numEntity);
117 };
118}
This is the object class that describes an entity.
Definition CEntity.h:58
This object class manages all entities within a scene.
Definition CEntityManager.h:89
Definition CArrayUtils.h:31
Everything in the Skylicht Engine. You can start by looking at the topics.
Definition AudioDebugLog.h:29