Switch from Nz prefix to namespace Nz
What a huge commit Former-commit-id: 38ac5eebf70adc1180f571f6006192d28fb99897
This commit is contained in:
@@ -15,62 +15,65 @@
|
||||
#include <Nazara/Utility/Config.hpp>
|
||||
#include <vector>
|
||||
|
||||
class NAZARA_UTILITY_API NzOBJParser
|
||||
namespace Nz
|
||||
{
|
||||
public:
|
||||
struct FaceVertex
|
||||
{
|
||||
int normal;
|
||||
int position;
|
||||
int texCoord;
|
||||
};
|
||||
class NAZARA_UTILITY_API OBJParser
|
||||
{
|
||||
public:
|
||||
struct FaceVertex
|
||||
{
|
||||
int normal;
|
||||
int position;
|
||||
int texCoord;
|
||||
};
|
||||
|
||||
struct Face
|
||||
{
|
||||
std::vector<FaceVertex> vertices;
|
||||
};
|
||||
struct Face
|
||||
{
|
||||
std::vector<FaceVertex> vertices;
|
||||
};
|
||||
|
||||
struct Mesh
|
||||
{
|
||||
std::vector<Face> faces;
|
||||
NzString name;
|
||||
unsigned int material;
|
||||
};
|
||||
struct Mesh
|
||||
{
|
||||
std::vector<Face> faces;
|
||||
String name;
|
||||
unsigned int material;
|
||||
};
|
||||
|
||||
NzOBJParser(NzInputStream& stream$);
|
||||
~NzOBJParser();
|
||||
OBJParser(InputStream& stream$);
|
||||
~OBJParser();
|
||||
|
||||
const NzString* GetMaterials() const;
|
||||
unsigned int GetMaterialCount() const;
|
||||
const Mesh* GetMeshes() const;
|
||||
unsigned int GetMeshCount() const;
|
||||
const NzString& GetMtlLib() const;
|
||||
const NzVector3f* GetNormals() const;
|
||||
unsigned int GetNormalCount() const;
|
||||
const NzVector4f* GetPositions() const;
|
||||
unsigned int GetPositionCount() const;
|
||||
const NzVector3f* GetTexCoords() const;
|
||||
unsigned int GetTexCoordCount() const;
|
||||
const String* GetMaterials() const;
|
||||
unsigned int GetMaterialCount() const;
|
||||
const Mesh* GetMeshes() const;
|
||||
unsigned int GetMeshCount() const;
|
||||
const String& GetMtlLib() const;
|
||||
const Vector3f* GetNormals() const;
|
||||
unsigned int GetNormalCount() const;
|
||||
const Vector4f* GetPositions() const;
|
||||
unsigned int GetPositionCount() const;
|
||||
const Vector3f* GetTexCoords() const;
|
||||
unsigned int GetTexCoordCount() const;
|
||||
|
||||
bool Parse();
|
||||
bool Parse();
|
||||
|
||||
private:
|
||||
bool Advance(bool required = true);
|
||||
void Error(const NzString& message);
|
||||
void Warning(const NzString& message);
|
||||
void UnrecognizedLine(bool error = false);
|
||||
private:
|
||||
bool Advance(bool required = true);
|
||||
void Error(const String& message);
|
||||
void Warning(const String& message);
|
||||
void UnrecognizedLine(bool error = false);
|
||||
|
||||
std::vector<Mesh> m_meshes;
|
||||
std::vector<NzString> m_materials;
|
||||
std::vector<NzVector3f> m_normals;
|
||||
std::vector<NzVector4f> m_positions;
|
||||
std::vector<NzVector3f> m_texCoords;
|
||||
NzInputStream& m_stream;
|
||||
NzString m_currentLine;
|
||||
NzString m_mtlLib;
|
||||
bool m_keepLastLine;
|
||||
unsigned int m_lineCount;
|
||||
unsigned int m_streamFlags;
|
||||
};
|
||||
std::vector<Mesh> m_meshes;
|
||||
std::vector<String> m_materials;
|
||||
std::vector<Vector3f> m_normals;
|
||||
std::vector<Vector4f> m_positions;
|
||||
std::vector<Vector3f> m_texCoords;
|
||||
InputStream& m_stream;
|
||||
String m_currentLine;
|
||||
String m_mtlLib;
|
||||
bool m_keepLastLine;
|
||||
unsigned int m_lineCount;
|
||||
unsigned int m_streamFlags;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // NAZARA_FORMATS_OBJPARSER_HPP
|
||||
|
||||
Reference in New Issue
Block a user