Hi,
I am working with the Five3D library and have a question regarding
cameras so if anyone is familiar with this or really good at explaining
3D math to 5 year old kids (I am feeling a bit dumb here).
The Five3D library itself does not have a camera, but projects its
objects straight into the scene. I would like to create a way of
orbiting a single cube object, like with a camera, rather than rotating
the object itself. My aim is to achieve the type of manipulation used
with the globe here - http://www.dasai.es/ - where the globe rotation
does not end up looking "wrong" from a user perspective when you are
looking along the Y axis or "flip" when the cube is upside down - here
is an early trial of mine showing the problems -
http://glenpike.co.uk/play/cubetest.html
I have not discounted using Papervision as it has cameras to do
this, but the text rendering of Five3D is cleaner than bitmapped PV3D
text and this is what I am looking for, so I would like to try and get
the Five3D working if possible before I discount it.
As the world only consists of one object, I am guessing it would be
fairly trivial to create a "fake" camera with a single matrix, apply
rotations to that matrix, then concatenate this matrix with the cube
objects. I tried a couple of things, but am flailing a bit in the dark
here and could do with some pointers if anyone has any ideas.
My first try was to apply X & Y rotations to a Matrix class - in
Five3D - then do Matrix to Euler to get the X, Y & Z rotations to apply
to my 3D object (meaning I did not have to hack the library yet). I
reckon I am going to have to dig deeper and manipulate the private
matrix used by each 3D object in the library.
I am assuming - maybe wrongly - that because I am wanting to orbit
around the origin, which is also the centre of the cube, I can pretend
my camera is also in the centre of the world, rather than transformed a
distance from the cube. This would mean I just have to rotate the x & y
axes of my camera to get "pitch" & "roll", then apply this to my cube
matrix. Question is, do I have to include the "distance" of the camera
from my object in the calculations and do I have to have a "look at"
point too, or can I cheat as these are always fixed?
Apart from looking at PV3D's camera's and some hardcore Wikipedia
entries, I don't have much to go on, so any information to get my head
around this would be helpful - particularly some real dumbed down
tutorials on Matrices, possibly Quaternions. (I fell asleep in my
lessons on the former and never covered the latter...)
Thanks in advance.
Glen
Glen Pike
01326 218440
www.glenpike.co.uk <http://www.glenpike.co.uk>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders