Struct liquidfun::box2d::particle::particle_color::ParticleColor [] [src]

pub struct ParticleColor {
    pub ptr: *mut B2ParticleColor,
}

Small color object for each particle

Fields

ptr

Methods

impl ParticleColor

fn new(r: UInt8, g: UInt8, b: UInt8, a: UInt8) -> ParticleColor

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

fn zero() -> ParticleColor

Create a ParticleColor with zero values.

fn is_zero(&self) -> bool

True when all four color elements equal 0. When true, a particle color buffer isn't allocated by CreateParticle().

fn ptr(&self) -> *mut B2ParticleColor

Get ParticleColor's raw pointer.

fn set(&self, r: UInt8, g: UInt8, b: UInt8, a: UInt8)

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

Trait Implementations

impl Drop for ParticleColor

fn drop(&mut self)

Derived Implementations

impl Clone for ParticleColor

fn clone(&self) -> ParticleColor

fn clone_from(&mut self, source: &Self)