Vizard 7 » Command Index » Vizard objects » node3d » <node3d:onthefly>.addVertex
7.6

<node3d:onthefly>.addVertex

Add a vertex

<node3d:onthefly>.addVertex(  
[x,y,z]  
color = None # Keyword argument
normal = None # Keyword argument
texCoord = None # Keyword argument
)  
[x,y,z]
The position of the vertex
color = None
Optionally specifies the color of the new vertex.
normal = None
Optionally specifies the normal vector of the new vertex.
texCoord = None
Optionally specifies the texture coordinate of the new vertex.

Remarks

This command will add a vertex to the existing On-The-Fly object. The vertex will be added to the end of the vertex list.

Return Value

The index of the new vertex

Example

viz.startLayer(viz.LINES)
viz.vertex(0,0,0)
viz.vertex(0,1,0)
lines = viz.endLayer()

#Add another line
lines.addVertex([1,0,0])
lines.addVertex([1,1,0])