Last modified 25 August 2003 by jdavis@math.wisc.edu
Conforms to NSObject, NSCoding, NSCopying
In the SMea Kit, scenes are constructed using scene graphs of type SMKSceneTree. Each node in a scene graph contains something that draws, in that it conforms to the SMKDrawing protocol described here. Notice that this protocol includes NSCoding and NSCopying.
Memory is conserved by sharing resources through an SMKResourceManager. After unarchiving, copying, or otherwise creating a drawer, you'll probably want to invoke the following method, which gives the object a chance to retain any resources that it needs.
- (id)useResourceManager:(SMKResourceManager *)resourceManager;Acquires resources needed by the drawer from the given resource manager, and returns the receiver.
The next two methods are used for normal drawing and for selection drawing. See SMKTester or the OpenGL Programming Guide for more information on selection. These two methods typically issue OpenGL commands.
- (id)draw;Draws the drawer and returns the receiver.
Draws the drawer for selection, manipulating the selection name stack if desired, and returns the receiver.
The typical SMKDrawing object represents a 3D object in world space. If this object is positioned at the origin, then its bounding radius is the radius of the smallest sphere, centered at the origin, that contains the object. SMKSceneTree wants to know the bounding radius of its drawers.
- (double)boundingRadius;Returns the drawer's bounding radius, which must be nonnegative.