[DEBUG] parse new format, but some error with shape"
This commit is contained in:
parent
3ad1725f54
commit
b1c211a585
@ -14,8 +14,10 @@ varying vec3 v_ecNormal;
|
||||
void main(void) {
|
||||
gl_Position = EW_MatrixTransformation * EW_MatrixPosition * vec4(EW_coord3d, 1.0);
|
||||
mat4 MatrixPosition = EW_MatrixPosition;
|
||||
/*
|
||||
MatrixPosition[3][0] = 0.0;
|
||||
MatrixPosition[3][1] = 0.0;
|
||||
MatrixPosition[3][2] = 0.0;
|
||||
*/
|
||||
v_ecNormal = vec3(MatrixPosition * vec4(EW_normal, 1.0) );
|
||||
}
|
||||
|
@ -67,6 +67,8 @@ btCollisionShape* ege::collision::createShape(const ememory::SharedPtr<ege::reso
|
||||
const btTransform localTransform(btQuaternion(qqq.x(),qqq.y(),qqq.z(),qqq.w()), tmpElement->getOrigin());
|
||||
outputShape->addChildShape(localTransform, tmpShape);
|
||||
}
|
||||
} else {
|
||||
EGE_ERROR("Allocation shape error BOX");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ void ege::resource::Mesh::clean() {
|
||||
}
|
||||
|
||||
|
||||
#define DISPLAY_NB_VERTEX_DISPLAYED
|
||||
//#define DISPLAY_NB_VERTEX_DISPLAYED
|
||||
|
||||
void ege::resource::Mesh::draw(mat4& _positionMatrix,
|
||||
bool _enableDepthTest,
|
||||
@ -223,9 +223,9 @@ void ege::resource::Mesh::draw(mat4& _positionMatrix,
|
||||
EGE_ERROR(" !!!! No Face to display elements [" << m_name << "]");
|
||||
} else {
|
||||
if (nbElementDrawTheoric != 0) {
|
||||
EGE_DEBUG(((float)nbElementDraw/(float)nbElementDrawTheoric*100.0f) << "% Request draw : " << m_listFaces.size() << ":" << nbElementDraw << "/" << nbElementDrawTheoric << " elements [" << m_name << "]");
|
||||
EGE_WARNING(((float)nbElementDraw/(float)nbElementDrawTheoric*100.0f) << "% Request draw : " << m_listFaces.size() << ":" << nbElementDraw << "/" << nbElementDrawTheoric << " elements [" << m_name << "]");
|
||||
} else {
|
||||
EGE_DEBUG("0% Request draw : " << m_listFaces.size() << ":" << nbElementDraw << "/" << nbElementDrawTheoric << " elements [" << m_name << "]");
|
||||
EGE_WARNING("0% Request draw : " << m_listFaces.size() << ":" << nbElementDraw << "/" << nbElementDrawTheoric << " elements [" << m_name << "]");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -197,7 +197,7 @@ bool ege::resource::Mesh::loadEMF(const std::string& _fileName) {
|
||||
offsetUV = m_listUV.size();
|
||||
offsetFaceNormal = m_listFacesNormal.size();
|
||||
offsetVertexNormal = m_listVertexNormal.size();
|
||||
|
||||
//EGE_ERROR("new offset: " << offsetVertexId << " " << offsetUV << " " << offsetFaceNormal << " " << offsetVertexNormal);
|
||||
} else if(strncmp(inputDataLine, "Materials:", 9) == 0) {
|
||||
currentMode = EMFModuleMaterial;
|
||||
// add previous material:
|
||||
@ -344,7 +344,9 @@ bool ege::resource::Mesh::loadEMF(const std::string& _fileName) {
|
||||
// new maretial selection
|
||||
currentMode = EMFModuleMeshFaceMaterial;
|
||||
FaceIndexing empty;
|
||||
m_listFaces.add(inputDataLine, empty);
|
||||
if (m_listFaces.exist(inputDataLine) == false) {
|
||||
m_listFaces.add(inputDataLine, empty);
|
||||
}
|
||||
meshFaceMaterialID = m_listFaces.getId(inputDataLine);
|
||||
EGE_VERBOSE(" " << inputDataLine);
|
||||
} else if (currentMode == EMFModuleMeshFaceMaterial) {
|
||||
@ -564,6 +566,17 @@ bool ege::resource::Mesh::loadEMF(const std::string& _fileName) {
|
||||
EGE_VERBOSE("Stop parsing Mesh file");
|
||||
|
||||
fileName.fileClose();
|
||||
|
||||
EGE_VERBOSE("New mesh : ");
|
||||
EGE_VERBOSE(" nb vertex: " << m_listVertex.size());
|
||||
EGE_VERBOSE(" nb UV: " << m_listUV.size());
|
||||
EGE_VERBOSE(" nb Colors: " << m_listColor.size());
|
||||
EGE_VERBOSE(" nb Normal Face: " << m_listFacesNormal.size());
|
||||
EGE_VERBOSE(" nb vertex Face: " << m_listVertexNormal.size());
|
||||
EGE_VERBOSE(" nb Faces: " << m_listFaces.size());
|
||||
EGE_VERBOSE(" nb material: " << m_materials.size());
|
||||
EGE_VERBOSE(" nb physic: " << m_physics.size());
|
||||
generateVBO();
|
||||
|
||||
return true;
|
||||
}
|
@ -79,7 +79,7 @@ namespace appl {
|
||||
|
||||
}
|
||||
void onLifeChange() {
|
||||
APPL_DEBUG("Looze life " << m_life);
|
||||
APPL_DEBUG("Loose life " << m_life);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -20,6 +20,9 @@ Physics:
|
||||
Box
|
||||
half-extents:0.567449 1.48439 0.565881
|
||||
origin:0.0233975 1.08701 0.559573
|
||||
Sphere
|
||||
radius:0.27172986930174403
|
||||
origin:1.67238 -1.15006 2.6986
|
||||
Mesh:wheel_1_rear_right
|
||||
Vertex:59
|
||||
-0.490127 0.129425 -3.755534|-0.285279 0.193374 -2.020798|-0.285279 0.193374 -2.223388|-0.510380 0.193374 -2.223388|-0.285279 0.281275 -2.203326|-0.510380 0.281275 -2.203326|-0.285279 0.351766 -2.147111|-0.510380 0.351766 -2.147111|-0.285279 0.390886 -2.065878|-0.510380 0.390886 -2.065878|-0.285279 0.390886 -1.975717|-0.510380 0.390886 -1.975717|-0.285279 0.351766 -1.894485|-0.510380 0.351766 -1.894485|-0.285279 0.281275 -1.838270|-0.510380 0.281275 -1.838270|-0.285279 0.193374 -1.818207|-0.510380 0.193374 -1.818207|-0.285279 0.105474 -1.838270|-0.510380 0.105474 -1.838270|-0.285279 0.034983 -1.894484|-0.510380 0.034983 -1.894484|-0.285279 -0.004137 -1.975717|-0.510380 -0.004137 -1.975717|-0.285279 -0.004137 -2.065878|-0.510380 -0.004137 -2.065878|-0.285279 0.034983 -2.147111|-0.510380 0.034983 -2.147111|-0.285279 0.105474 -2.203326|-0.510380 0.105474 -2.203326|-0.510811 0.193374 -2.165229|-0.510811 0.257918 -2.150926|-0.510811 0.309678 -2.110849|-0.510811 0.338403 -2.052937|-0.510811 0.338403 -1.988659|-0.510811 0.309678 -1.930746|-0.510811 0.257918 -1.890669|-0.510811 0.193374 -1.876366|-0.510811 0.128831 -1.890669|-0.510811 0.077070 -1.930746|-0.510811 0.048346 -1.988659|-0.510811 0.048346 -2.052937|-0.510811 0.077070 -2.110849|-0.510811 0.128831 -2.150926|-0.486623 0.193374 -2.020798|-0.486623 0.193374 -2.165229|-0.486623 0.257918 -2.150926|-0.486623 0.309678 -2.110849|-0.486623 0.338403 -2.052937|-0.486623 0.338403 -1.988659|-0.486623 0.309678 -1.930746|-0.486623 0.257918 -1.890669|-0.486623 0.193374 -1.876366|-0.486623 0.128831 -1.890669|-0.486623 0.077070 -1.930746|-0.486623 0.048346 -1.988659|-0.486623 0.048346 -2.052937|-0.486623 0.077070 -2.110849|-0.486623 0.128831 -2.150926|
|
||||
|
Loading…
x
Reference in New Issue
Block a user