Vis 2
Kinetic Visualization for 3D shape and structure
Main Page
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Pages
SurfaceAlignedParticleGroup.h
1
#pragma once
2
#include "SurfaceAlignedParticle.h"
3
#include "IParticleGroup.h"
4
#include "Texture.h"
5
#include "ParticleRenderer.h"
6
#include "HalfedgeMesh.h"
7
#include "SurfaceAlignedParticleGroupProperties.h"
8
9
class
ParticleManager
;
10
15
class
SurfaceAlignedParticleGroup
:
public
virtual
IParticleGroup
16
{
17
public
:
18
//TODO add faceNormal
19
SurfaceAlignedParticleGroup
(std::string name);
20
~
SurfaceAlignedParticleGroup
();
21
22
void
addParticle(
SurfaceAlignedParticle
* particle);
23
void
addParticles(std::vector<SurfaceAlignedParticle*> particles);
24
25
//IRenderable
26
void
initialize();
27
void
bindResources(
const
Shader
* shader);
28
void
unbindResources();
29
void
draw();
30
31
//IParticleGroup
32
void
update();
33
int
numberAlive();
34
void
spawn(
int
i);
35
void
ensureCapacity(
int
size);
36
37
int
size();
void
updateWithProperties(
SurfaceAlignedParticleGroupProperties
* props);
38
private
:
39
std::vector<SurfaceAlignedParticle*> _particles;
40
41
GLuint _vao;
42
GLuint _vboPositions;
43
GLuint _vboHalfSizes;
44
GLuint _vboDirections;
45
GLuint _vboParticleColors;
46
//TODO: When particles are binned per face, it is not necessary to pass one normal per particle but one normal per face!
47
GLuint _vboFaceNormals;
48
49
unsigned
_numberOfAliveParticles = 0;
50
unsigned
_waitingForSpawn = 0;
51
52
};
53
SurfaceAlignedParticleGroup
Definition:
SurfaceAlignedParticleGroup.h:15
ParticleManager
Definition:
ParticleManager.h:20
SurfaceAlignedParticleGroupProperties
Definition:
SurfaceAlignedParticleGroupProperties.h:20
Shader
Definition:
Shader.h:24
IParticleGroup
Definition:
IParticleGroup.h:9
SurfaceAlignedParticle
Definition:
SurfaceAlignedParticle.h:13
Generated on Wed Jun 11 2014 04:58:03 for Vis 2 by
1.8.6