TDME2
1.9.121
src
tdme
engine
subsystems
rendering
TransparentRenderPointsPool.cpp
Go to the documentation of this file.
1
#include <
tdme/engine/subsystems/rendering/TransparentRenderPointsPool.h
>
2
3
#include <algorithm>
4
#include <string>
5
#include <vector>
6
7
#include <
tdme/tdme.h
>
8
#include <
tdme/engine/model/Color4.h
>
9
#include <
tdme/engine/model/Color4Base.h
>
10
#include <
tdme/engine/subsystems/rendering/TransparentRenderPoint.h
>
11
#include <
tdme/math/Vector3.h
>
12
#include <
tdme/utilities/Console.h
>
13
14
using
std::string;
15
using
std::vector;
16
17
using
tdme::engine::model::Color4
;
18
using
tdme::engine::model::Color4Base
;
19
using
tdme::engine::subsystems::rendering::TransparentRenderPoint
;
20
using
tdme::engine::subsystems::rendering::TransparentRenderPointsPool
;
21
using
tdme::math::Vector3
;
22
using
tdme::utilities::Console
;
23
24
TransparentRenderPointsPool::TransparentRenderPointsPool(int32_t pointsMax)
25
{
26
poolIdx
= 0;
27
transparentRenderPoints
.resize(pointsMax);
28
for
(
auto
i = 0; i <
transparentRenderPoints
.size(); i++) {
29
transparentRenderPoints
[i] =
new
TransparentRenderPoint
();
30
}
31
}
32
33
TransparentRenderPointsPool::~TransparentRenderPointsPool
() {
34
for
(
auto
i = 0; i <
transparentRenderPoints
.size(); i++)
delete
transparentRenderPoints
[i];
35
}
36
37
void
TransparentRenderPointsPool::reset
()
38
{
39
poolIdx
= 0;
40
}
41
42
void
TransparentRenderPointsPool::sort
()
43
{
44
std::sort(
transparentRenderPoints
.begin(),
transparentRenderPoints
.begin() +
poolIdx
,
TransparentRenderPoint::compare
);
45
}
Color4Base.h
Color4.h
Console.h
TransparentRenderPoint.h
TransparentRenderPointsPool.h
Vector3.h
tdme::engine::model::Color4Base
Color 4 base definition class.
Definition:
Color4Base.h:19
tdme::engine::model::Color4
Color 4 definition.
Definition:
Color4.h:20
tdme::engine::subsystems::rendering::TransparentRenderPointsPool
Transparent render points pool.
Definition:
TransparentRenderPointsPool.h:27
tdme::engine::subsystems::rendering::TransparentRenderPointsPool::~TransparentRenderPointsPool
~TransparentRenderPointsPool()
Destructor.
Definition:
TransparentRenderPointsPool.cpp:33
tdme::engine::subsystems::rendering::TransparentRenderPointsPool::sort
void sort()
Sort transparent render points.
Definition:
TransparentRenderPointsPool.cpp:42
tdme::engine::subsystems::rendering::TransparentRenderPointsPool::poolIdx
int32_t poolIdx
Definition:
TransparentRenderPointsPool.h:32
tdme::engine::subsystems::rendering::TransparentRenderPointsPool::transparentRenderPoints
vector< TransparentRenderPoint * > transparentRenderPoints
Definition:
TransparentRenderPointsPool.h:31
tdme::engine::subsystems::rendering::TransparentRenderPointsPool::reset
void reset()
Reset.
Definition:
TransparentRenderPointsPool.cpp:37
tdme::math::Vector3
3D vector 3 class
Definition:
Vector3.h:22
tdme::utilities::Console
Console class.
Definition:
Console.h:26
tdme::engine::subsystems::rendering::TransparentRenderPoint
Transparent point to be rendered.
Definition:
TransparentRenderPoint.h:19
tdme::engine::subsystems::rendering::TransparentRenderPoint::compare
static bool compare(TransparentRenderPoint *point1, TransparentRenderPoint *point2)
Compare.
Definition:
TransparentRenderPoint.h:31
tdme.h
Generated by
1.9.3