Nebula
Loading...
Searching...
No Matches
emittermesh.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
17#include "coregraphics/mesh.h"
18#include "util/fixedarray.h"
19
20//------------------------------------------------------------------------------
21namespace Particles
22{
24{
25public:
30
32 void Setup(const CoreGraphics::MeshId mesh, IndexT primGroupIndex);
34 void Discard();
36 bool IsValid() const;
37
44
46 const EmitterPoint& GetEmitterPoint(IndexT key) const;
47
48private:
49 // width in number of vec4's...
50 static const SizeT VertexWidth = sizeof(EmitterPoint) / sizeof(Math::vec4);
53};
54
55//------------------------------------------------------------------------------
58inline bool
60{
61 return (0 != this->points);
62}
63
64} // namespace Particles
65//------------------------------------------------------------------------------
An emitter mesh holds positions and normals for particle emission.
Definition emittermesh.h:24
EmitterMesh()
constructor
Definition emittermesh.cc:20
EmitterPoint * points
Definition emittermesh.h:52
~EmitterMesh()
destructor
Definition emittermesh.cc:30
bool IsValid() const
return true if object has been setup
Definition emittermesh.h:59
void Setup(const CoreGraphics::MeshId mesh, IndexT primGroupIndex)
setup the emitter mesh
Definition emittermesh.cc:42
void Discard()
discard the emitter mesh
Definition emittermesh.cc:134
SizeT numPoints
Definition emittermesh.h:51
const EmitterPoint & GetEmitterPoint(IndexT key) const
get emitter point
Definition emittermesh.cc:146
static const SizeT VertexWidth
Definition emittermesh.h:50
Particle context controls playing and enabling/disabling of particle emitters inside a model.
Definition modelnode.h:37
Definition mesh.h:29
A 4D vector.
Definition vec4.h:24
Definition emittermesh.h:39
Math::vec4 tangent
Definition emittermesh.h:42
Math::vec4 position
Definition emittermesh.h:40
Math::vec4 normal
Definition emittermesh.h:41
int SizeT
Definition types.h:49
int IndexT
Definition types.h:48