Bubba-3D
0.9.0
Awesome game engine!
Main Page
Classes
Files
File List
includes
ParticleGenerator.h
1
/*
2
* This file is part of Bubba-3D.
3
*
4
* Bubba-3D is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU Lesser General Public License as published by
6
* the Free Software Foundation, either version 3 of the License, or
7
* (at your option) any later version.
8
*
9
* Bubba-3D is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU Lesser General Public License for more details.
13
*
14
* You should have received a copy of the GNU Lesser General Public License
15
* along with Bubba-3D. If not, see http://www.gnu.org/licenses/.
16
*/
17
#pragma once
18
19
#include "linmath/float3.h"
20
#include <vector>
21
#include "IRenderComponent.h"
22
23
#define LINEAR_SCALE_FACTOR 50.0f
24
#define LOD_FACTOR 25.0f
25
26
class
Camera
;
27
class
Texture
;
28
class
Particle
;
29
class
ParticleConf
;
30
31
class
ParticleGenerator
:
public
IRenderComponent
32
{
33
public
:
34
ParticleGenerator
(
Texture
*texture,
int
amount,
35
Camera
*camera, chag::float4x4 modelMatrix,
36
ParticleConf
*conf);
37
38
~
ParticleGenerator
();
39
44
void
update
(
float
dt);
45
50
void
renderShadow
(
ShaderProgram
* shaderProgram) {};
51
55
void
render
();
56
57
void
setScaleLod(
bool
value);
58
59
void
setLooping(
bool
value);
60
private
:
61
std::vector<Particle*> m_particles;
62
GLuint m_vaob;
63
Texture
*texture;
64
int
m_amount = 0;
65
Camera
*m_camera;
66
67
ParticleConf
*conf;
68
bool
doScale =
true
;
69
70
chag::float3x3 getModelMatrix3x3();
71
};
ParticleGenerator::renderShadow
void renderShadow(ShaderProgram *shaderProgram)
Definition:
ParticleGenerator.h:50
ParticleConf
Definition:
ParticleConf.h:23
ParticleGenerator::update
void update(float dt)
Definition:
ParticleGenerator.cpp:137
Texture
Definition:
Texture.h:23
ShaderProgram
Class for maintaining OpenGL shader programs.
Definition:
ShaderProgram.h:39
ParticleGenerator
Definition:
ParticleGenerator.h:31
IRenderComponent
Definition:
IRenderComponent.h:23
ParticleGenerator::render
void render()
Definition:
ParticleGenerator.cpp:80
Particle
Definition:
Particle.h:31
Camera
Definition:
Camera.h:26
Generated on Sun Oct 9 2016 20:52:17 for Bubba-3D by
1.8.11