Covellite++
Version: 2.3.2 Revision: 2584 Platform: x64 Build: 19:03 05.09.2026
Кроссплатформенный фреймворк для разработки приложений на С++
Toggle main menu visibility
Загрузка...
Поиск...
Не найдено
Particles.hpp
1
2
#pragma once
3
#include <thread>
4
#include <glm/glm.force.hpp>
5
#include "Defines.hpp"
6
#include "GameObject.hpp"
7
8
namespace
basement
9
{
10
11
namespace
model
12
{
13
42
class
Particles final :
43
public
GameObject
44
{
45
class
Particle
46
{
47
public
:
48
::glm::vec3 Position;
49
::glm::vec3 Speed;
50
float
HalfSize;
51
float
Time;
52
};
53
54
class
Instance
55
{
56
public
:
57
static
String_t GetDescriptor(
void
) {
return
uT(
"i4f4"
); }
58
int32_t i1, i2, i3, i4;
// Заглушка, чтобы проверять корректность смещения
59
float
x, y, z, HalfSize;
60
};
61
62
using
ParticlesPtr_t = ::std::shared_ptr<::std::vector<Particle>>;
63
64
public
:
65
Objects_t
GetObject
(
const
Any_t &)
const override
;
66
67
private
:
68
void
BuildVertexesParticles(
void
);
69
void
BuildInstansedParticles(
void
);
70
Objects_t GetVertexesObject(
void
)
const
;
71
Objects_t GetInstancedObject(
void
)
const
;
72
73
private
:
74
const
bool
m_IsParticleInstance;
75
const ::std::size_t m_Count;
76
const
float
m_ParticleHalfSize = 0.03f;
77
ParticlesPtr_t m_pParticles;
78
::std::vector<Vertex_t> m_Vertexes;
79
::std::vector<::std::vector<int>> m_Indices;
80
//::std::vector<::std::thread> m_Threads;
81
82
private
:
83
Particles(
void
);
84
friend
GameObject;
85
};
86
87
}
// namespace model
88
89
}
// namespace basement
basement
Определения
Common.hpp:10
basement::model::Particles::GetObject
Objects_t GetObject(const Any_t &) const override
Функция получения уникального набора компонентов игрового объекта.
Определения
Particles.cpp:27
Solution
Solution
Example
Example
Basements
Demo
Particles.hpp
Документация по Covellite++. Последние изменения:
. Создано системой
1.18.0