LiquidFun
 All Classes Files Functions Variables Enumerations Enumerator Macros Pages
Public Member Functions | Public Attributes | List of all members
b2ParticleColor Struct Reference

Small color object for each particle. More...

#include <b2Particle.h>

Public Member Functions

 b2ParticleColor (int32 r, int32 g, int32 b, int32 a)
 
 b2ParticleColor (const b2Color &color)
 
bool IsZero () const
 
b2Color GetColor () const
 
void Set (int32 r_, int32 g_, int32 b_, int32 a_)
 
void Set (const b2Color &color)
 

Public Attributes

uint8 r
 
uint8 g
 
uint8 b
 
uint8 a
 

Detailed Description

Small color object for each particle.

Constructor & Destructor Documentation

b2ParticleColor::b2ParticleColor ( int32  r,
int32  g,
int32  b,
int32  a 
)
inline

Constructor with four elements: r (red), g (green), b (blue), and a (opacity). Each element can be specified 0 to 255.

b2ParticleColor::b2ParticleColor ( const b2Color color)

Constructor that initializes the above four elements with the value of the b2Color object

Member Function Documentation

b2Color b2ParticleColor::GetColor ( ) const

Used internally to convert the value of b2Color.

bool b2ParticleColor::IsZero ( ) const
inline

True when all four color elements equal 0. When true, no memory is used for particle color.

void b2ParticleColor::Set ( int32  r_,
int32  g_,
int32  b_,
int32  a_ 
)
inline

Sets color for current object using the four elements described above.

void b2ParticleColor::Set ( const b2Color color)

Initializes the above four elements with the value of the b2Color object


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