33#ifndef DVD_PARTICLE_DATA_H_
34#define DVD_PARTICLE_DATA_H_
54 "Position",
"Velocity",
"Acceleration",
"Colour",
"Colour transform",
"UNKNOWN"
Rough around the edges Adapter pattern abstracting the actual rendering API and access to the GPU.
Container to store data for a given set of particles.
void sort()
Sort ALIVE particles only.
PrimitiveTopology particleGeometryType() const noexcept
static constexpr U32 g_threadPartitionSize
PROPERTY_RW(U32, optionsMask, 0u)
void swapData(U32 indexA, U32 indexB)
vector< vec4< F32 > > _acceleration
x,y,z = _acceleration; w = weight;
vector< FColour4 > _startColour
r,g,b,a = colour and transparency
vector< vec4< F32 > > _position
x,y,z = position; w = size
vector< vec3< F32 > > _particleGeometryVertices
U32 aliveCount() const noexcept
vector< U32 > _particleGeometryIndices
vector< vec4< F32 > > _renderingPositions
PrimitiveTopology _particleGeometryType
vector< std::pair< U32, F32 > > _indices
helper array used for sorting
const vector< U32 > & particleGeometryIndices() const noexcept
void setParticleGeometry(const vector< vec3< F32 > > &particleGeometryVertices, const vector< U32 > &particleGeometryIndices, PrimitiveTopology particleGeometryType)
void generateParticles(U32 particleCount, U32 optionsMask)
vector< FColour4 > _colour
r,g,b,a = colour and transparency
U32 totalCount() const noexcept
bool isBillboarded() const noexcept
const vector< vec3< F32 > > & particleGeometryVertices() const noexcept
vector< UColour4 > _renderingColours
vector< FColour4 > _endColour
r,g,b,a = colour and transparency
void setBillboarded(bool state) noexcept
string _textureFileName
Location of the texture file. Leave blank for colour only.
vector< vec4< F32 > > _misc
x = time; y = interpolation; z = 1 / time; w = distance to camera sq;
vector< vec4< F32 > > _velocity
x,y,z = _velocity; w = angle;
static const char * particleDataProperties[]
Handle console commands that start with a forward slash.
eastl::vector< Type > vector
constexpr T toBit(const T X)
Converts an arbitrary positive integer value to a bitwise value used for masks.