Hooray! I've got a screenshot here of the various shapes showing up on the iPad Simulator:
Yeah, they're a little dim right now, but they should do the job nicely. I'm going to clone them and fill a grid with these guys!
The next thing I need to do is to really get my mind around how to use these objects as object-oriented graphics. All of these graphics live in a common "_SIO2resource" variable - sort of a set of 3D objects to draw. That's where the shapes live. They have "transformations" associated with each one - they determine the location, size and orientation of the object, but that information lives with the graphics in the _SIO2resource. But I want to be able to have individual objects - instances of custom classes - that have variables and methods beyond those involving their graphical layout. How to reconcile these two schema?
I think that what I will do when I create a new piece is to first duplicate the graphic from the master graphic, which both installs the graphic in _SIO2resource and gives me a variable that I can use to directly refer to the graphic. I'll initialize an instance of a corresponding class and pass the graphic along in the constructor (or a modifier method). That way, both the _SIO2resource and the graphic can both access the transformations for the graphic - the instance object can modify them, and on the next graphical update, the _SIOresource will read the transformations and use them to position, resize and orient the graphics. It'll be great. (If it works.)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment