Vizard 8 » Command Index » Vizard objects » node3d » <node3d:onthefly>.dynamic
8.1

<node3d:onthefly>.dynamic

Notify Vizard that the On-The-Fly object will be modified frequently

<node3d:onthefly>.dynamic()  

Remarks

If you are going to frequently modify an On-The-Fly object (i.e. Change the vertex position within a timer) then this command will help speed up rendering.

Return Value

None

Example

#Create a triangle
viz.startLayer(viz.TRIANGLES)
viz.vertex(-1,0,0)
viz.vertex(1,0,0)
viz.vertex(0,1,0)
triangle = viz.endLayer()

#The contents will be changing frequently
triangle.dynamic()

def changeVertex():
    #Change the position of a vertex
    triangle.setVertex(0,x,y,z)

vizact.ontimer(0.1, changeVertex)

See also

<node3d:onthefly>.static
<node3d:onthefly>.setNormal
<node3d:onthefly>.setTexCoord
<node3d:onthefly>.setVertex
<node3d:onthefly>.setVertexColor