3#include <Foundation/Containers/Deque.h>
4#include <Foundation/Containers/Map.h>
5#include <Foundation/Strings/String.h>
6#include <Utilities/UtilitiesDLL.h>
76 void ComputeTangentSpaceVectors();
79 void SortFacesByMaterial();
84 plResult LoadOBJ(
const char* szFile,
bool bIgnoreMaterials =
false);
92 plResult LoadMTL(
const char* szFile,
const char* szMaterialBasePath =
"");
A hybrid array uses in-place storage to handle the first few elements without any allocation....
Definition HybridArray.h:12
A loader class for OBJ/MTL files.
Definition OBJLoader.h:17
bool HasVertexNormals() const
Returns whether vertex-normals are available for this mesh. Otherwise only face-normals are available...
Definition OBJLoader.h:73
bool HasTextureCoordinates() const
Returns whether texture-coordinates are available for this mesh.
Definition OBJLoader.h:70
Holds all data about one face (ie. polygon, not only triangles).
Definition OBJLoader.h:44
plUInt32 m_uiMaterialID
The ID of the material, that this face uses.
Definition OBJLoader.h:48
plVec3 m_vNormal
The face-normal, automatically computed.
Definition OBJLoader.h:51
plHybridArray< FaceVertex, 4 > m_Vertices
All vertices of the face.
Definition OBJLoader.h:59
PL_ALWAYS_INLINE bool operator<(const Face &rhs) const
Less-than operator is needed for sorting faces by material.
Definition OBJLoader.h:62
Stores the information for a vertex in a face.
Definition OBJLoader.h:21
plUInt32 m_uiNormalID
Index into the m_Normals array.
Definition OBJLoader.h:25
plUInt32 m_uiTexCoordID
Index into the m_TexCoords array.
Definition OBJLoader.h:26
plUInt32 m_uiPositionID
Index into the m_Positions array.
Definition OBJLoader.h:24
Holds the information about one Material.
Definition OBJLoader.h:34
plUInt32 m_uiMaterialID
The ID of this material.
Definition OBJLoader.h:39
plString m_sDiffuseTexture
The path to the diffuse texture of this material.
Definition OBJLoader.h:36
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54