ColorAttrib

from acron.core import ColorAttrib
class ColorAttrib

Bases:

Bases: RenderAttrib

Indicates what color should be applied to renderable geometry.

Inheritance diagram

digraph inheritancea3b2008a27 { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "ColorAttrib" [URL="acron.core.ColorAttrib.html#acron.core.ColorAttrib",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "RenderAttrib" -> "ColorAttrib" [arrowsize=0.75,style=""]; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "ReferenceCount" [URL="acron.core.ReferenceCount.html#acron.core.ReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "ReferenceCount" [arrowsize=0.75,style=""]; "RenderAttrib" [URL="acron.core.RenderAttrib.html#acron.core.RenderAttrib",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedWritableReferenceCount" -> "RenderAttrib" [arrowsize=0.75,style=""]; "TypedObject" [URL="acron.core.TypedObject.html#acron.core.TypedObject",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "TypedObject" [arrowsize=0.75,style=""]; "TypedWritable" [URL="acron.core.TypedWritable.html#acron.core.TypedWritable",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedObject" -> "TypedWritable" [arrowsize=0.75,style=""]; "TypedWritableReferenceCount" [URL="acron.core.TypedWritableReferenceCount.html#acron.core.TypedWritableReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedWritable" -> "TypedWritableReferenceCount" [arrowsize=0.75,style=""]; "ReferenceCount" -> "TypedWritableReferenceCount" [arrowsize=0.75,style=""]; }
enum Type
enumerator T_vertex = 0
enumerator T_flat = 1
enumerator T_off = 2
property class_slot → int
property color → LColor

If the type is T_flat or T_off, this returns the color that will be applied to geometry. If the type is T_vertex, this is meaningless.

property color_type → Type

Returns the type of color specified by this ColorAttrib. The options are:

T_vertex - use the vertex color specified in the geometry itself.

T_flat - use the color specified in this ColorAttrib for all geometry. You can get this color via get_color().

T_off - use the color white.

static get_class_slot()
static get_class_type()
get_color()

If the type is T_flat or T_off, this returns the color that will be applied to geometry. If the type is T_vertex, this is meaningless.

get_color_type()

Returns the type of color specified by this ColorAttrib. The options are:

T_vertex - use the vertex color specified in the geometry itself.

T_flat - use the color specified in this ColorAttrib for all geometry. You can get this color via get_color().

T_off - use the color white.

static make_default()

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

static make_flat()

Constructs a new ColorAttrib object that indicates geometry should be rendered in the indicated color.

static make_off()

Constructs a new ColorAttrib object that indicates geometry should be rendered in white.

static make_vertex()

Constructs a new ColorAttrib object that indicates geometry should be rendered according to its own vertex color.