[DEBUG] error When loading mesh

This commit is contained in:
Edouard DUPIN 2014-01-22 21:15:09 +01:00
parent e23442beb1
commit 2b31c01fab
3 changed files with 15 additions and 11 deletions

View File

@ -120,11 +120,9 @@ void ege::Environement::addCreator(const std::string& _type, ege::createElement_
EGE_ERROR("Try to add an empty CREATOR ...");
return;
}
if (getHachTableCreating().exist(_type) == true) {
getHachTableCreating()[_type] = _creator;
return;
}
EGE_DEBUG("Add creator: " << _type);
getHachTableCreating().add(_type, _creator);
EGE_DEBUG("Add creator: " << _type << " (done)");
}
ege::ElementGame* ege::Environement::createElement(const std::string& _type, bool _autoAddElement, enum ege::property _property, void* _value) {

View File

@ -50,12 +50,18 @@ namespace ege {
protected:
std::vector<int32_t> m_groupDestination;
public:
const std::vector<int32_t>& getDestinationGroup(void) { return m_groupDestination; };
void addGroupDestination(int32_t _id) { m_groupDestination.push_back(_id); };
const std::vector<int32_t>& getDestinationGroup(void) {
return m_groupDestination;
};
void addGroupDestination(int32_t _id) {
m_groupDestination.push_back(_id);
};
protected:
vec3 m_positionSource;
public:
const vec3& getSourcePosition(void) { return m_positionSource; };
const vec3& getSourcePosition(void) {
return m_positionSource;
};
public:
ElementInteraction(int32_t _type, int32_t _groupSource, const vec3& _pos) :
m_type(_type),

View File

@ -836,10 +836,10 @@ bool ege::resource::Mesh::loadEMF(const std::string& _fileName) {
normalIndex[0] = 0;
normalIndex[1] = 0;
normalIndex[2] = 0;
scanf(inputDataLine, "%d/%d/%d %d/%d/%d %d/%d/%d",
&vertexIndex[0], &uvIndex[0], &normalIndex[0],
&vertexIndex[1], &uvIndex[1], &normalIndex[1],
&vertexIndex[2], &uvIndex[2], &normalIndex[2] );
sscanf(inputDataLine, "%d/%d/%d %d/%d/%d %d/%d/%d",
&vertexIndex[0], &uvIndex[0], &normalIndex[0],
&vertexIndex[1], &uvIndex[1], &normalIndex[1],
&vertexIndex[2], &uvIndex[2], &normalIndex[2] );
m_listFaces.getValue(meshFaceMaterialID).m_faces.push_back(Face(vertexIndex[0], uvIndex[0], normalIndex[0],
vertexIndex[1], uvIndex[1], normalIndex[1],
vertexIndex[2], uvIndex[2], normalIndex[2]));