33#include "RenderMesh/CMesh.h"
34#include "RenderMesh/CSkinnedMesh.h"
36#include "Importer/CBaseMeshImporter.h"
42 SObjMtl() : Meshbuffer(0), Bumpiness(1.0f), Illumination(0),
43 RecalculateNormals(
false)
46 Meshbuffer->getMaterial().Shininess = 0.0f;
52 SObjMtl(
const SObjMtl& o)
53 : Name(o.Name), Group(o.Group),
54 Bumpiness(o.Bumpiness), Illumination(o.Illumination),
55 RecalculateNormals(
false)
58 Meshbuffer->getMaterial() = o.Meshbuffer->
getMaterial();
67 bool RecalculateNormals;
70 class SKYLICHT_API COBJMeshFileLoader :
public CBaseMeshImporter
75 std::string m_modelName;
82 virtual ~COBJMeshFileLoader();
84 virtual bool loadModel(
const char* resource,
CEntityPrefab* output,
bool normalMap =
true,
bool flipNormalMap =
true,
bool texcoord2 =
true,
bool batching =
false);
86 void readMTL(
const c8* fileName,
const io::path& relPath);
90 bool retrieveVertexIndices(
c8* vertexData,
s32* idx,
const c8* bufEnd,
u32 vbsize,
u32 vtsize,
u32 vnsize);
95 const c8* readTextures(
const c8* bufPtr,
const c8*
const bufEnd,
SObjMtl* currMaterial,
const io::path& relPath);
97 const c8* goFirstWord(
const c8* buf,
const c8*
const bufEnd,
bool acrossNewlines =
true);
99 const c8* goNextWord(
const c8* buf,
const c8*
const bufEnd,
bool acrossNewlines =
true);
101 const c8* goNextLine(
const c8* buf,
const c8*
const bufEnd);
103 u32 copyWord(
c8* outBuf,
const c8* inBuf,
u32 outBufLength,
const c8*
const pBufEnd);
107 const c8* goAndCopyNextWord(
c8* outBuf,
const c8* inBuf,
u32 outBufLength,
const c8*
const pBufEnd);
115 const c8* readBool(
const c8* bufPtr,
bool& tf,
const c8*
const bufEnd);
This object class is created to store data in an array of multiple CEntities.
Definition CEntityPrefab.h:38
Self reallocating template array (like stl vector) with additional features.
Definition irrArray.h:23
map template for associative arrays using a red-black tree
Definition irrMap.h:19
Implementation of the IMeshBuffer interface.
Definition CMeshBuffer.h:18
virtual const video::SMaterial & getMaterial() const
Get material of this meshbuffer.
Definition CMeshBuffer.h:240
Class representing a 32 bit ARGB color.
Definition SColor.h:285
Class representing a color with four floats.
Definition SColor.h:542
SColor toSColor() const
Converts this color to a SColor without floats.
Definition SColor.h:574
Everything in the Skylicht Engine. You can start by looking at the topics.
Definition AudioDebugLog.h:29
IVideoDriver * getVideoDriver()
Get the video driver used for rendering.
vector3d< f32 > vector3df
Typedef for a f32 3d vector.
Definition vector3d.h:445
vector2d< f32 > vector2df
Typedef for f32 2d vector.
Definition vector2d.h:323
string< c8 > stringc
Typedef for character strings.
Definition irrString.h:1373
core::string< fschar_t > path
Type used for all file system related strings.
Definition path.h:17
float f32
32 bit floating point variable.
Definition irrTypes.h:104
unsigned int u32
32 bit unsigned variable.
Definition irrTypes.h:58
char c8
8 bit character variable.
Definition irrTypes.h:31
signed int s32
32 bit signed variable.
Definition irrTypes.h:66
Definition COBJMeshFileLoader.h:41