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

<node3d:onthefly>.static

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

<node3d:onthefly>.static()  

Remarks

If you are not going to frequently modify an On-The-Fly object then this command will help speed up rendering. By default, all On-The-Fly objects are marked as static.

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)

mytimer = vizact.ontimer(0.1, changeVertex)

.
.
.

#Done modifying the object frequently
mytimer.setEnabled(viz.OFF)
triangle.static()

See also

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