ColorScaleAttrib

class ColorScaleAttrib

Bases: RenderAttrib

Applies a scale to colors in the scene graph and on vertices.

Inheritance diagram

Inheritance diagram of ColorScaleAttrib

static int get_class_slot(void)
static TypeHandle get_class_type(void)
LVecBase4 const &get_scale(void) const

Returns the scale to be applied to colors.

bool has_alpha_scale(void) const

Returns true if the ColorScaleAttrib has a non-identity scale in the alpha component (ignoring RGB), or false otherwise.

bool has_rgb_scale(void) const

Returns true if the ColorScaleAttrib has a non-identity scale in the RGB components (ignoring alpha), or false otherwise.

bool has_scale(void) const

Returns true if the ColorScaleAttrib has a non-identity scale, false otherwise (in which case it might be an off attrib or an identity attrib).

bool is_identity(void) const

Returns true if the ColorScaleAttrib is an identity attrib, false if it is either an off attrib or it has a scale.

bool is_off(void) const

Returns true if the ColorScaleAttrib will ignore any color scales inherited from above, false otherwise. This is not the same thing as !has_scale(); a ColorScaleAttrib may have the “off” flag set and also have another scale specified.

static ConstPointerTo<RenderAttrib> make(LVecBase4 const &scale)

Constructs a new ColorScaleAttrib object that indicates geometry should be scaled by the indicated factor.

static ConstPointerTo<RenderAttrib> make_default(void)

Returns a RenderAttrib that corresponds to whatever the standard default properties for render attributes of this type ought to be.

static ConstPointerTo<RenderAttrib> make_identity(void)

Constructs an identity scale attrib.

static ConstPointerTo<RenderAttrib> make_off(void)

Constructs a new ColorScaleAttrib object that ignores any ColorScaleAttrib inherited from above. You may also specify an additional color scale to apply to geometry below (using set_scale()).

ConstPointerTo<RenderAttrib> set_scale(LVecBase4 const &scale) const

Returns a new ColorScaleAttrib, just like this one, but with the scale changed to the indicated value.