Vizard 7 » Command Index » Vizard modules » viz » <viz>.vertexColor
7.7

<viz>.vertexColor

Sets the vertex color when creating On-The-Fly objects

<viz>.vertexColor(  
[r,g,b]  
)  
[r,g,b]
The red, green, blue component for the vertex. Values can range between 0.0 and 1.0.

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 color of the vertex.

Return Value

None

Example

viz.startLayer(viz.POINTS)
viz.vertexColor(1,0,0)
viz.vertex(0,1,0) # A red point at [0,1,0].
viz.endLayer()

See also

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