Objects Render now!
- Added Circle rendering using unit circle scaling & translation
- Added Rect rendering by well, generating a rect
- Changed coordinate system from (-1,-1)-(1,1) to (0,0)-(width, height)
- Fixed crashing on exit by adding UserObject::Destroy()
How it went
Being fair, it was quite simple once I actually understood the math, which was the hard part.
All it took was scaling unit circle coordinates (which are sin theta, cos theta) by the radius and translating them by the center. Another difficult thing was figuring out how to correctly scale the objects, but I achieved that by scrapping pixel-normallized conversions and changing the entire coordinate system into a pixel-based one (for the scene at least).
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.