Wasabi
Public Member Functions | Public Attributes | List of all members
WParticlesInstance Struct Reference

#include <WParticles.hpp>

Public Member Functions

void SetParameters (const WMatrix &WVP, WColor color, WVector2 uvTopLeft, WVector2 uvBottomRight, float localSize, float viewSize)
 

Public Attributes

WVector4 mat1
 
WVector4 mat2
 
WVector4 mat3
 
WVector4 colorAndUVs
 
float sizeLocalSpace
 
float sizeViewSpace
 
float pad1
 
float pad2
 

Detailed Description

An instance of a particle

Member Function Documentation

◆ SetParameters()

void WParticlesInstance::SetParameters ( const WMatrix WVP,
WColor  color,
WVector2  uvTopLeft,
WVector2  uvBottomRight,
float  localSize,
float  viewSize 
)
inline

Utility to encode the particle instance parameters into its fields

Member Data Documentation

◆ colorAndUVs

WVector4 WParticlesInstance::colorAndUVs

Encoded particle color (multiplied by texture color) and UVs:

  • The integer component of each float is rgba [0-255]
  • The floating point component of each float is (uv top-left, uv bottom-right) [0.01-0.99]

◆ mat1

WVector4 WParticlesInstance::mat1

Encoded WVP transformation matrix: (m11, m12, m13, m41)

◆ mat2

WVector4 WParticlesInstance::mat2

Encoded WVP transformation matrix: (m21, m22, m23, m42)

◆ mat3

WVector4 WParticlesInstance::mat3

Encoded WVP transformation matrix: (m31, m32, m33, m43)

◆ pad1

float WParticlesInstance::pad1

Padding to be aligned to pixel size

◆ pad2

float WParticlesInstance::pad2

Padding to be aligned to pixel size

◆ sizeLocalSpace

float WParticlesInstance::sizeLocalSpace

Size multiplier applied before any transformation (in local space) in the VS

◆ sizeViewSpace

float WParticlesInstance::sizeViewSpace

Size added to the x and y components of the particles in view space


The documentation for this struct was generated from the following file: