Rotation format in .COB
Hello,
I am an application developed working on "VR" apps and have been using TS as my
object modeler. I am now trying to improve my development cycle by writing a
tool
to convert objects in .COB binary format to .RWX for my RenderWare real-time 3D
API to use. I am succesful converting object geometry, scaling, translation,
polygon
textures including UV coords and colors, but am lacking a correct
interpretation of
the .COB encoding of object rotation.
What is the trick? Is all I need to know about an object's rotation stored in
the values of
the "Current Position" block of a Polygon Chunk? Or do I need to somehow apply
the
numbers in the "Local Axis" block of the Polygon Chunk?
Furthermore would you please tell me what in what order the values are in the
"Current Position" block are? For example the scaleX is in position 2 of row1,
etc. The
matrix notation I must adapt to for RenderWare script files gives a generalized
transformation matrix which looks like this:
ScaleX Something Something 0
something ScaleY something 0
something something ScaleZ 0
TransX TransY TransZ 1
As I say I have Scaling and Translating down, the "Something" fields are how I
mix in the rotation business, although I have a tech support question in with
them on
the exact nature of their matrix as well. It's confusing that your file spec
says the
fourth row is always [0,0,0,1], but yet RenderWare thinks that is a column.
New file formats always confuse me!
Please respond ASAP if possible as I am working on this tool now.
thanks
Ken Tabor
Micro Focus