PDA

View Full Version : Transormation Matrix



govny
31-08-2003, 12:42 PM
I am new to Delphix.
I have seen that is quite simple to create sprites but i don't understand how to create Poligons (triangles)
Are there transformation matrix to rotate and so on triangles?
Thanks

Alimonster
02-09-2003, 12:45 PM
I can't really speak of DelphiX since I've not used it, but what you're looking at is standard math stuff. Could you detail more about what you need?

If it's just drawing and rotating polygons, ... well, first of all, are you using the 3d stuff of DelphiX? If not then you would probably want to render the polygons yourself as a software rendering process (lock the surface, do your drawing, unlock).

Maybe you'd be happier with a more 3d-specific api for this stuff, such as OpenGL. It would make your life much simpler for polygon manipulation and drawing sprites wouldn't be too difficult either (just a textured quad after all). The trick there would be to use an orthographic projection (i.e., glOrtho) so you don't deal with perspective projection.

If you want the rotation formula things then it's just the usual cos, sin stuff (link (http://www.alistairkeys.co.uk/rotation.shtml)).

Anyway, consider this response more as a bump than anything else. :roll: Let us know more about what you intend to do and what aspects of DelphiX you need.