scene = viz.MainScene
If the parent is viz.WORLD or viz.SCREEN, then the argument represents the scene to add the object to.
If the parent is viz.ORTHO, then the argument represents the window to add the object to.
If the parent is a valid node3d object, then the argument is ignored.
This is the last step in the creation of an On-The-Fly object. There must have been a call to
<viz>.startLayer before this.
On-The-Fly objects have lighting disabled on them by default. You can enabling lighting by using the
<node3d>.enable command. In order for lighting to work properly, you will need to specify a normal vector for each vertex using the
<viz>.normal command.
viz.startLayer(viz.QUADS)
viz.vertex(-1,1,0)
viz.vertex(1,1,0)
viz.vertex(1,-1,0)
viz.vertex(-1,-1,0)
quad = viz.endLayer()
quad.setPosition([0,2,0])