Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

SceneOBJ.cpp File Reference

#include <GL/gl.h>
#include "SceneOBJ.h"
#include "AABox.h"
#include "Message.h"
#include <QList>
#include <QFile>
#include <QStringList>
#include <QTextStream>

Namespaces

namespace  apig

Classes

class  Face
struct  VertexOBJ

Defines

#define FORMAT_ERROR(message)
#define UNSUPPORTED(message)   Message::error(QString("balise non supportee : fichier '%1' ligne %2 : %3").arg(fileName).arg(num).arg(message));
#define READ_NEXT_LINE
#define END_FILE   (stream.atEnd())
#define SPLIT_LINE   word = line.section("#", 0, 0).simplified().split(" ", QString::SkipEmptyParts);
#define FLOAT_REQ(ok, val, i)   bool ok = (i < word.size()); float val = ok ? word[i].toFloat(&ok) : 0.0f;
#define FLOAT_OPT(ok, val, i, def)   bool ok = true; float val = (i < word.size()) ? word[i].toFloat(&ok) : def;
#define INT_OPT(ok, val, tab, i, def)   bool ok = true; int val = (i >= tab.size() || tab[i].isEmpty()) ? def : tab[i].toInt(&ok);

Define Documentation

#define END_FILE   (stream.atEnd())
 

#define FLOAT_OPT ok,
val,
i,
def   )     bool ok = true; float val = (i < word.size()) ? word[i].toFloat(&ok) : def;
 

#define FLOAT_REQ ok,
val,
 )     bool ok = (i < word.size()); float val = ok ? word[i].toFloat(&ok) : 0.0f;
 

#define FORMAT_ERROR message   ) 
 

Value:

{ \
            Message::error(QString("erreur de format du fichier '%1' ligne %2 : %3").arg(fileName).arg(num).arg(message)); \
            file.close();   \
            return; }

#define INT_OPT ok,
val,
tab,
i,
def   )     bool ok = true; int val = (i >= tab.size() || tab[i].isEmpty()) ? def : tab[i].toInt(&ok);
 

#define READ_NEXT_LINE
 

Value:

if (stream.atEnd()) FORMAT_ERROR("fin de fichier inattendue")    \
            else { line = stream.readLine(); num++; }

#define SPLIT_LINE   word = line.section("#", 0, 0).simplified().split(" ", QString::SkipEmptyParts);
 

#define UNSUPPORTED message   )     Message::error(QString("balise non supportee : fichier '%1' ligne %2 : %3").arg(fileName).arg(num).arg(message));
 


Generated on Thu Nov 13 22:15:46 2008 for Api Graphics by  doxygen 1.4.4