<viz>.texCoord

Sets the texture coordinate when creating On-The-Fly objects

 

<viz>.texCoord(
    [x,y,z]    
    unit = 0    # keyword argument

)

 

[x,y,z]

The texture coordinate. The z component is optional and only used with 3D textures.


unit = 0

The texture unit


Remarks

This command is part of the On-The-Fly family of commands. Use this family of commands to build your own On-The-Fly OpenGL based primitives that get added to your scene. It must be called within the <viz>.startLayer and <viz>.endLayer commands. Call this command before calling <viz>.vertex to set the texture coordinate of the vertex.

Return Value

None

Example

viz.startLayer(viz.QUADS)

viz.texCoord(0,1)
viz.vertex(-1,1,0)

viz.texCoord(1,1)
viz.vertex(1,1,0)

viz.texCoord(1,0)
viz.vertex(1,-1,0)

viz.texCoord(0,0)
viz.vertex(-1,-1,0)

viz.endLayer()

See also

<viz>.startLayer
<viz>.endLayer
<viz>.vertex
<viz>.vertexColor
<viz>.normal
<viz>.lineWidth
<viz>.pointSize