Vizard 8 » Command Index » Vizard objects » node3d » <node3d>.texGen
8.1

<node3d>.texGen

Set the texture coordinate generation mode

<node3d>.texGen(  
tg  
node = ''  
unit = 0  
op = viz.OP_DEFAULT  
)  
tg
A viz.TextureGen object. See remarks for more details.
node = ''
Name of sub-node to apply changes to
unit = 0
The texture unit to apply the changes to, or viz.AUTO_COMPUTE to apply changes to all available texture units.
op = viz.OP_DEFAULT
Can be viz.OP_DEFAULT to use the nodes default op mode or a combination of the following values:

Op modes

viz.OP_TRAVERSE

When performing an operation on a node, traverse the entire subgraph and process all subnodes as well. This is the default value.

viz.OP_OVERRIDE

When applying attributes, have them override attributes of subnodes.

viz.OP_ROOT

When performing an operation on the node, start at the root transform of the node, instead of the model. Processing the root will include all child Vizard nodes.

Remarks

This command controls how automatic texture coordinates are generated when using the fixed function pipeline.

The viz.TextureGen object contains the following attributes for controlling texture coordinate generation:

Attribute

Description

mode

One of the following modes:

viz.GL_OBJECT_LINEAR
viz.GL_EYE_LINEAR
viz.GL_SPHERE_MAP
viz.GL_NORMAL_MAP
viz.GL_REFLECTION_MAP
viz.TEXGEN_PROJECT_EYE
viz.TEXGEN_PROJECT_MAT

matrix

Matrix transform to apply to generated coordinates.

Return Value

None