loader_obj::Material

namespace marengine::loader_obj

Typedefs

typedef maths::vec2 Vector2
typedef maths::vec3 Vector3
class Loader

Public Functions

Loader() = default
~Loader()
bool LoadFile(std::string Path)

Public Members

std::vector<Mesh> LoadedMeshes
std::vector<Vertex> LoadedVertices
std::vector<uint32_t> LoadedIndices
std::vector<Material> LoadedMaterials

Private Functions

void GenVerticesFromRawOBJ(std::vector<Vertex> &oVerts, const std::vector<Vector3> &iPositions, const std::vector<Vector2> &iTCoords, const std::vector<Vector3> &iNormals, const std::string &icurline)
void VertexTriangluation(std::vector<uint32_t> &oIndices, const std::vector<Vertex> &iVerts)
bool LoadMaterials(std::string path)
int32_t checkVertexType(const std::string &sFace, std::vector<std::string> &sVertices) const
struct Material

Public Members

std::string name
Vector3 Ka
Vector3 Kd
Vector3 Ks
float Ns = {0.f}
float Ni = {0.f}
float d = {0.f}
int32_t illum = {0}
std::string map_Ka
std::string map_Kd
std::string map_Ks
std::string map_Ns
std::string map_d
std::string map_bump
struct Mesh

Public Functions

Mesh() = default
Mesh(std::vector<Vertex> &_Vertices, std::vector<uint32_t> &_Indices)

Public Members

std::string MeshName
std::vector<Vertex> Vertices
std::vector<uint32_t> Indices
Material MeshMaterial
namespace algorithm

Functions

template<class T>
const T &getElement(const std::vector<T> &elements, const std::string &strIndex)