poly model extractor complete with misterious left-right problem for mickey and pluto. This version doesn't support nurbs model.

This commit is contained in:
Asad M. Zaman 2003-11-17 21:31:02 +00:00
parent 4d3451edab
commit de732a0bab
2 changed files with 16 additions and 5 deletions

View File

@ -53,6 +53,7 @@ public:
char *GetName(SAA_Scene *scene, SAA_Elem *element);
char *GetFullName(SAA_Scene *scene, SAA_Elem *element);
EggGroupNode *get_egg_root() {return _egg_root;}
EggGroup *get_egg_group(SoftNodeDesc *node_desc);
EggTable *get_egg_table(SoftNodeDesc *node_desc);
EggXfmSAnim *get_egg_anim(SoftNodeDesc *node_desc);

View File

@ -956,6 +956,7 @@ make_polyset(SoftNodeDesc *node_desc, EggGroup *egg_group, SAA_ModelType type) {
int i, idx;
SAA_modelGetNodeVisibility( &scene, node_desc->get_model(), &visible );
cout << "model visibility: " << visible << endl;
@ -978,7 +979,16 @@ make_polyset(SoftNodeDesc *node_desc, EggGroup *egg_group, SAA_ModelType type) {
string vpool_name = name + ".verts";
EggVertexPool *vpool = new EggVertexPool(vpool_name);
egg_group->add_child(vpool);
// add the vertices in the _tree._root node, so that
// they will be written out first in egg file. This
// solves a problem of soft-skinning trying to access
// vertex pool before it is defined.
//_tree.get_egg_root()->add_child(vpool);
_tree.get_egg_root()->insert(_tree.get_egg_root()->begin(), vpool);
//egg_group->add_child(vpool);
/*
// create a copy of vpool in node_desc which will be used later
@ -1431,7 +1441,7 @@ make_soft_skin() {
exit(1);
}
string vpool_name = s_name + ".verts";
DCAST_INTO_R(vpool, mesh_node->get_egg_group()->find_child(vpool_name), NULL);
DCAST_INTO_R(vpool, _tree.get_egg_root()->find_child(vpool_name), NULL);
// find the mapping of the vertices that match this envelop
if (vpool) {