Quote:
Originally Posted by Vortex
Question: What if I want to rotate around each axis at different 'speeds'...? (Yeah I know, spoiling all the fun this question is... ).
|
Not a bad question.
It can definitely be done, including with the optimised version of the routine. You'd just need to read in separate cos / sin numbers for the x, y & z angles. This would only affect the build matrix part of the code as this is the only part where differences in x, y & z angles have an effect on the calculations. Obviously, doing these angles separately would mean the current build matrix routine would need to be amended slightly and would probably get a little more complicated - but not too much.
The reason I used only one angle for x, y & z is mainly cos I just want a spinning cube and equal angles gives (I think...) a nice spin.
Quote:
Originally Posted by Vortex
Anyway, let me say I'm really impressed by what you've accomplished so far.
|
Cheers man, appreciated.
To be honest I've really enjoyed doing this routine. I've done lots or reading, lots of pre-planning and lots of work with the debugger checking calculations. Plus this is really the first routine where I've done what I would consider 'real' optimisation. It's all kinda made me feel more like a proper coder.
Quote:
Originally Posted by Vortex
It's gonna be a very nice mega demo...
|
I hope so! Next up for this routine is to try to get hidden lines working I think - not sure if I'll succeed in that aim as I think it's gonna tax me pretty heavily but, as always, I'll enjoy the challenge!