TexGenAttrib

class TexGenAttrib

Bases: RenderAttrib

Computes texture coordinates for geometry automatically based on vertex position and/or normal. This can be used to implement reflection and/or refraction maps, for instance to make shiny surfaces, as well as other special effects such as projective texturing.

Inheritance diagram

digraph inheritance6e1f1c7cb1 { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "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=""]; "TexGenAttrib" [URL="acron.core.TexGenAttrib.html#acron.core.TexGenAttrib",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "RenderAttrib" -> "TexGenAttrib" [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=""]; }
TexGenAttrib.add_stage()

Returns a new TexGenAttrib just like this one, with the indicated generation mode for the given stage. If this stage already exists, its mode is replaced.

Returns a new TexGenAttrib just like this one, with the indicated generation mode for the given stage. If this stage already exists, its mode is replaced.

This variant also accepts constant_value, which is only meaningful if mode is M_constant.

static TexGenAttrib.get_class_slot()
static TexGenAttrib.get_class_type()
TexGenAttrib.get_constant_value()

Returns the constant value associated with the named texture stage. This is only meaningful if the mode is M_constant.

TexGenAttrib.get_geom_rendering()

Returns the union of the Geom::GeomRendering bits that will be required once this TexGenAttrib is applied to a geom which includes the indicated geom_rendering bits.

TexGenAttrib.get_mode()

Returns the generation mode associated with the named texture stage, or M_off if nothing is associated with the indicated stage.

TexGenAttrib.has_gen_texcoord_stage()

Returns true if the indicated TextureStage will have texture coordinates generated for it automatically (and thus there is no need to upload the texture coordinates encoded in the vertices).

TexGenAttrib.has_stage()

Returns true if there is a mode associated with the indicated stage, or false otherwise (in which case get_transform(stage) will return M_off).

TexGenAttrib.is_empty()

Returns true if no stages are defined in the TexGenAttrib, false if at least one is.

static TexGenAttrib.make()

Constructs a TexGenAttrib that generates no stages at all.

Constructs a TexGenAttrib that generates just the indicated stage.

static TexGenAttrib.make_default()

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

TexGenAttrib.remove_stage()

Returns a new TexGenAttrib just like this one, with the indicated stage removed.