build on linux

This commit is contained in:
David Rose 2006-06-08 17:55:00 +00:00
parent 40db93b374
commit 1fd3751a11

View File

@ -87,11 +87,8 @@ public:
void CreateSkinCluster(MayaEggMesh *M); void CreateSkinCluster(MayaEggMesh *M);
typedef phash_map<EggVertexPool *, MayaEggMesh *> MeshTable; typedef phash_map<EggVertexPool *, MayaEggMesh *> MeshTable;
typedef second_of_pair_iterator<MeshTable::const_iterator> MeshIterator;
typedef phash_map<EggGroup *, MayaEggJoint *> JointTable; typedef phash_map<EggGroup *, MayaEggJoint *> JointTable;
typedef second_of_pair_iterator<JointTable::const_iterator> JointIterator;
typedef phash_map<string, MayaEggTex *> TexTable; typedef phash_map<string, MayaEggTex *> TexTable;
typedef second_of_pair_iterator<TexTable::const_iterator> TexIterator;
MeshTable _mesh_tab; MeshTable _mesh_tab;
JointTable _joint_tab; JointTable _joint_tab;
@ -745,9 +742,9 @@ bool MayaEggLoader::ConvertEggData(EggData *data, bool merge, bool model, bool a
return false; return false;
} }
MeshIterator ci; MeshTable::const_iterator ci;
JointIterator ji; JointTable::const_iterator ji;
TexIterator ti; TexTable::const_iterator ti;
if (MGlobal::isYAxisUp()) { if (MGlobal::isYAxisUp()) {
data->set_coordinate_system(CS_yup_right); data->set_coordinate_system(CS_yup_right);
@ -758,7 +755,7 @@ bool MayaEggLoader::ConvertEggData(EggData *data, bool merge, bool model, bool a
TraverseEggNode(data, NULL); TraverseEggNode(data, NULL);
for (ci = _mesh_tab.begin(); ci != _mesh_tab.end(); ++ci) { for (ci = _mesh_tab.begin(); ci != _mesh_tab.end(); ++ci) {
MayaEggMesh *mesh = (*ci); MayaEggMesh *mesh = (*ci).second;
if (mesh->_face_count==0) continue; if (mesh->_face_count==0) continue;
MStatus status; MStatus status;
@ -778,29 +775,29 @@ bool MayaEggLoader::ConvertEggData(EggData *data, bool merge, bool model, bool a
double thickness = 0.0; double thickness = 0.0;
for (ji = _joint_tab.begin(); ji != _joint_tab.end(); ++ji) { for (ji = _joint_tab.begin(); ji != _joint_tab.end(); ++ji) {
double dfo = ((*ji)->GetPos()).length(); double dfo = ((*ji).second->GetPos()).length();
if (dfo > thickness) thickness = dfo; if (dfo > thickness) thickness = dfo;
} }
thickness = thickness * 0.025; thickness = thickness * 0.025;
for (ji = _joint_tab.begin(); ji != _joint_tab.end(); ++ji) { for (ji = _joint_tab.begin(); ji != _joint_tab.end(); ++ji) {
MayaEggJoint *joint = *ji; MayaEggJoint *joint = (*ji).second;
joint->ChooseEndPos(thickness); joint->ChooseEndPos(thickness);
joint->CreateMayaBone(); joint->CreateMayaBone();
} }
for (ci = _mesh_tab.begin(); ci != _mesh_tab.end(); ++ci) { for (ci = _mesh_tab.begin(); ci != _mesh_tab.end(); ++ci) {
MayaEggMesh *mesh = (*ci); MayaEggMesh *mesh = (*ci).second;
EggGroup *joint = mesh->GetControlJoint(); EggGroup *joint = mesh->GetControlJoint();
if (joint) CreateSkinCluster(mesh); if (joint) CreateSkinCluster(mesh);
} }
for (ci = _mesh_tab.begin(); ci != _mesh_tab.end(); ++ci) (*ci)->AssignNames(); for (ci = _mesh_tab.begin(); ci != _mesh_tab.end(); ++ci) (*ci).second->AssignNames();
for (ji = _joint_tab.begin(); ji != _joint_tab.end(); ++ji) (*ji)->AssignNames(); for (ji = _joint_tab.begin(); ji != _joint_tab.end(); ++ji) (*ji).second->AssignNames();
for (ti = _tex_tab.begin(); ti != _tex_tab.end(); ++ti) (*ti)->AssignNames(); for (ti = _tex_tab.begin(); ti != _tex_tab.end(); ++ti) (*ti).second->AssignNames();
for (ci = _mesh_tab.begin(); ci != _mesh_tab.end(); ++ci) delete *ci; for (ci = _mesh_tab.begin(); ci != _mesh_tab.end(); ++ci) delete (*ci).second;
for (ji = _joint_tab.begin(); ji != _joint_tab.end(); ++ji) delete *ji; for (ji = _joint_tab.begin(); ji != _joint_tab.end(); ++ji) delete (*ji).second;
for (ti = _tex_tab.begin(); ti != _tex_tab.end(); ++ti) delete *ti; for (ti = _tex_tab.begin(); ti != _tex_tab.end(); ++ti) delete (*ti).second;
// ResumeSetKeyMode(); // ResumeSetKeyMode();
// ResumeAnimate(); // ResumeAnimate();