thomas pleyber wrote:
> Basically, does the 3ds file format allows to retain a hierarchy of 
> transformations ?
Yes, 3ds file format allows to do this.
You can create nodes hierarchy and apply transformations for every node.
Checkout Lib3dsNode - childs, parent, name fields and player sample.

Here is a sample how I export my scene to the 3ds file format:
I create nodes hierarchy and assign mesh structures for nodes.
Lib3dsFile *file = lib3ds_file_new();
Lib3dsNode *node = lib3ds_create_root_node(file);
lib3ds_node_rotate_y(node, (float)LIB3DS_PI);
Lib3dsWord parent_id   = node->node_id;
Lib3dsNode *node_child = lib3ds_create_rotated_x_node(file, parent_id, 
(float)LIB3DS_PI); // flip y axis
Lib3dsWord child_id = node_child->node_id;
Lib3dsMesh *mesh = lib3ds_mesh_new(sName.c_str());
lib3ds_create_empty_mesh_node(file, mesh, child_id);
(mesh will be rotated by y axis and by x axis)

> or shall I translate the whole scene in the world coordinate system and 
> put identity transformation for every node and mesh ?
No you should not do this.

Not sure does it helps, but if you need something please ask.

Tomas


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
lib3ds-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lib3ds-devel

Reply via email to