2016-05-14 01:45:56 +00:00
|
|
|
#ifndef B3_IMPORT_MESH_UTILITY_H
|
2016-05-25 22:37:28 +00:00
|
|
|
#define B3_IMPORT_MESH_UTILITY_H
|
2016-05-14 01:45:56 +00:00
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
2018-10-14 19:54:34 +00:00
|
|
|
enum b3ImportMeshDataFlags
|
|
|
|
{
|
|
|
|
B3_IMPORT_MESH_HAS_RGBA_COLOR=1,
|
|
|
|
B3_IMPORT_MESH_HAS_SPECULAR_COLOR=2,
|
|
|
|
};
|
|
|
|
|
2016-05-18 06:57:19 +00:00
|
|
|
struct b3ImportMeshData
|
|
|
|
{
|
|
|
|
struct GLInstanceGraphicsShape* m_gfxShape;
|
|
|
|
|
2018-09-23 21:17:31 +00:00
|
|
|
unsigned char* m_textureImage1; //in 3 component 8-bit RGB data
|
2017-10-25 15:15:01 +00:00
|
|
|
bool m_isCached;
|
2016-05-18 06:57:19 +00:00
|
|
|
int m_textureWidth;
|
|
|
|
int m_textureHeight;
|
2018-10-14 19:54:34 +00:00
|
|
|
double m_rgbaColor[4];
|
|
|
|
double m_specularColor[4];
|
|
|
|
int m_flags;
|
|
|
|
|
|
|
|
b3ImportMeshData()
|
|
|
|
:m_gfxShape(0),
|
|
|
|
m_textureImage1(0),
|
|
|
|
m_isCached(false),
|
|
|
|
m_textureWidth(0),
|
|
|
|
m_textureHeight(0),
|
|
|
|
m_flags(0)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2016-05-18 06:57:19 +00:00
|
|
|
};
|
|
|
|
|
2016-05-14 01:45:56 +00:00
|
|
|
class b3ImportMeshUtility
|
|
|
|
{
|
|
|
|
public:
|
2018-10-09 04:27:08 +00:00
|
|
|
static bool loadAndRegisterMeshFromFileInternal(const std::string& fileName, b3ImportMeshData& meshData, struct CommonFileIOInterface* fileIO);
|
2016-05-14 01:45:56 +00:00
|
|
|
};
|
|
|
|
|
2018-09-23 21:17:31 +00:00
|
|
|
#endif //B3_IMPORT_MESH_UTILITY_H
|