Commit 6fb4609c authored by Jonathan Kunstwald's avatar Jonathan Kunstwald

Fix importer indentation

parent 74d2d2e9
This diff is collapsed.
......@@ -18,12 +18,12 @@ namespace assimp
{
constexpr uint32_t importDefaultFlags =
aiProcess_SortByPType |
aiProcess_Triangulate |
aiProcess_CalcTangentSpace |
aiProcess_GenSmoothNormals |
aiProcess_GenUVCoords |
aiProcess_PreTransformVertices;
aiProcess_SortByPType |
aiProcess_Triangulate |
aiProcess_CalcTangentSpace |
aiProcess_GenSmoothNormals |
aiProcess_GenUVCoords |
aiProcess_PreTransformVertices;
constexpr uint32_t importFlipUVFlags = importDefaultFlags | aiProcess_FlipUVs;
......@@ -66,7 +66,7 @@ private: // settings
/// vec2 aTexCoord is available (hopefully)
bool mGenerateUVCoords = true;
bool mFlipUVCoords = false;
bool mFlipUVCoords = false;
public:
GLOW_PROPERTY(CalculateTangents);
......@@ -78,91 +78,91 @@ public:
public:
struct MeshData
{
std::vector<glm::vec3> positions;
std::vector<glm::vec3> normals;
std::vector<glm::vec3> tangents;
std::vector<std::vector<glm::vec2>> texCoords;
std::vector<std::vector<glm::vec4>> colors;
std::vector<uint32_t> indices;
std::string filename;
};
struct MeshData
{
std::vector<glm::vec3> positions;
std::vector<glm::vec3> normals;
std::vector<glm::vec3> tangents;
std::vector<std::vector<glm::vec2>> texCoords;
std::vector<std::vector<glm::vec4>> colors;
std::vector<uint32_t> indices;
std::string filename;
};
Importer();
/// Importer instance version of LoadAndCreateMesh
/// Importer instance version of LoadAndCreateMesh
SharedVertexArray load(std::string const& filename);
/// Importer instance version of LoadData
MeshData loadDataCustom(std::string const& filename);
/// Importer instance version of LoadData
MeshData loadDataCustom(std::string const& filename);
public:
/// Loads and creates a VA from a given filename
/// Supported file formats at time of writing this are:
///
/// COMMON INTERCHANGE FORMATS
/// Autodesk ( .fbx )
/// Collada ( .dae )
/// glTF ( .gltf, .glb )
/// Blender 3D ( .blend )
/// 3ds Max 3DS ( .3ds )
/// 3ds Max ASE ( .ase )
/// Wavefront Object ( .obj )
/// Industry Foundation Classes (IFC/Step) ( .ifc )
/// XGL ( .xgl,.zgl )
/// Stanford Polygon Library ( .ply )
/// *AutoCAD DXF ( .dxf )
/// LightWave ( .lwo )
/// LightWave Scene ( .lws )
/// Modo ( .lxo )
/// Stereolithography ( .stl )
/// DirectX X ( .x )
/// AC3D ( .ac )
/// Milkshape 3D ( .ms3d )
/// * TrueSpace ( .cob,.scn )
///
/// MOTION CAPTURE FORMATS
/// Biovision BVH ( .bvh )
/// * CharacterStudio Motion ( .csm )
/// GRAPHICS ENGINE FORMATS
/// Ogre XML ( .xml )
/// Irrlicht Mesh ( .irrmesh )
/// * Irrlicht Scene ( .irr )
/// GAME FILE FORMATS
/// Quake I ( .mdl )
/// Quake II ( .md2 )
/// Quake III Mesh ( .md3 )
/// Quake III Map/BSP ( .pk3 )
/// * Return to Castle Wolfenstein ( .mdc )
/// Doom 3 ( .md5* )
/// *Valve Model ( .smd,.vta )
/// *Open Game Engine Exchange ( .ogex )
/// *Unreal ( .3d )
///
/// OTHER FILE FORMATS
/// BlitzBasic 3D ( .b3d )
/// Quick3D ( .q3d,.q3s )
/// Neutral File Format ( .nff )
/// Sense8 WorldToolKit ( .nff )
/// Object File Format ( .off )
/// PovRAY Raw ( .raw )
/// Terragen Terrain ( .ter )
/// 3D GameStudio (3DGS) ( .mdl )
/// 3D GameStudio (3DGS) Terrain ( .hmp )
/// Izware Nendo ( .ndo )
///
/// Each attribute gets their own buffer.
static SharedVertexArray LoadAndCreateMesh(std::string const& filename, uint32_t flags = importDefaultFlags);
/// Creates a VA from MeshData
/// Requires OGL context and initialized GLOW on the same thread
static SharedVertexArray CreateMeshFromData(const MeshData& data);
/// Loads MeshData from a given filename with the given importer flags
/// Can be run on any thread
static MeshData LoadData(std::string const& filename, uint32_t flags = importDefaultFlags);
/// Loads and creates a VA from a given filename
/// Supported file formats at time of writing this are:
///
/// COMMON INTERCHANGE FORMATS
/// Autodesk ( .fbx )
/// Collada ( .dae )
/// glTF ( .gltf, .glb )
/// Blender 3D ( .blend )
/// 3ds Max 3DS ( .3ds )
/// 3ds Max ASE ( .ase )
/// Wavefront Object ( .obj )
/// Industry Foundation Classes (IFC/Step) ( .ifc )
/// XGL ( .xgl,.zgl )
/// Stanford Polygon Library ( .ply )
/// *AutoCAD DXF ( .dxf )
/// LightWave ( .lwo )
/// LightWave Scene ( .lws )
/// Modo ( .lxo )
/// Stereolithography ( .stl )
/// DirectX X ( .x )
/// AC3D ( .ac )
/// Milkshape 3D ( .ms3d )
/// * TrueSpace ( .cob,.scn )
///
/// MOTION CAPTURE FORMATS
/// Biovision BVH ( .bvh )
/// * CharacterStudio Motion ( .csm )
/// GRAPHICS ENGINE FORMATS
/// Ogre XML ( .xml )
/// Irrlicht Mesh ( .irrmesh )
/// * Irrlicht Scene ( .irr )
/// GAME FILE FORMATS
/// Quake I ( .mdl )
/// Quake II ( .md2 )
/// Quake III Mesh ( .md3 )
/// Quake III Map/BSP ( .pk3 )
/// * Return to Castle Wolfenstein ( .mdc )
/// Doom 3 ( .md5* )
/// *Valve Model ( .smd,.vta )
/// *Open Game Engine Exchange ( .ogex )
/// *Unreal ( .3d )
///
/// OTHER FILE FORMATS
/// BlitzBasic 3D ( .b3d )
/// Quick3D ( .q3d,.q3s )
/// Neutral File Format ( .nff )
/// Sense8 WorldToolKit ( .nff )
/// Object File Format ( .off )
/// PovRAY Raw ( .raw )
/// Terragen Terrain ( .ter )
/// 3D GameStudio (3DGS) ( .mdl )
/// 3D GameStudio (3DGS) Terrain ( .hmp )
/// Izware Nendo ( .ndo )
///
/// Each attribute gets their own buffer.
static SharedVertexArray LoadAndCreateMesh(std::string const& filename, uint32_t flags = importDefaultFlags);
/// Creates a VA from MeshData
/// Requires OGL context and initialized GLOW on the same thread
static SharedVertexArray CreateMeshFromData(const MeshData& data);
/// Loads MeshData from a given filename with the given importer flags
/// Can be run on any thread
static MeshData LoadData(std::string const& filename, uint32_t flags = importDefaultFlags);
};
}
};
\ No newline at end of file
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment