DD::Image::SpriteGenerator Class Reference

Public Member Functions

 SpriteGenerator (const GeoInfo *info)
 
size_t getParticleCount () const
 
bool getSprite (unsigned index, MatrixArray *transform, Sprite &sprite)
 
Hash getHash (int i) const
 

Detailed Description

Helper structure to generate a particular sprite

Member Function Documentation

size_t SpriteGenerator::getParticleCount ( ) const

get the number of available particles

bool SpriteGenerator::getSprite ( unsigned  index,
MatrixArray transform,
Sprite sprite 
)

fill the sprite structure passed in for the particle at the given index, applying the given transform. This function returns true if the particle is visible after applying the transform, false if not. If the particle is not visible, the sprite structure will not contain a valid sprite and should not be used

References DD::Image::MatrixArray::matrix(), and DD::Image::Matrix4::z_axis().

Referenced by DD::Image::ParticlesSprite::tessellateSprite().

Hash SpriteGenerator::getHash ( int  i) const

get a unique hash for the particle; this can be used to identify the same particle at another point in time

Referenced by DD::Image::ParticlesSprite::tessellateSprite().



©2021 The Foundry Visionmongers, Ltd. All Rights Reserved.
www.thefoundry.co.uk