Primitive Manager
The primitive manager contains spatial data structures used to efficiently render primitives. Once a primitive is initialized, it must be added to the primitive manager before it will be rendered. For example:
Once added to the manager, primitives are rendered the next time the scene is redrawn. This will happen when the user clicks a mouse button or the animation time changes. The scene can also be redrawn explicitly:
[C#] | Copy Code | |
---|---|---|
|
For best performance, add several primitives to the manager and only redraw the scene once after adding all the primitives.
When a primitive should no longer be rendered, remove it from the manager:
[C#] | Copy Code | |
---|---|---|
|