Obj-Importer: start new streaming handling.
parent
b61aaf7ec4
commit
0bae2bbfa7
|
@ -104,7 +104,7 @@ struct Face
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
//! \struct Object
|
//! \struct Object
|
||||||
//! \brief Stores all objects of an objfile object definition
|
//! \brief Stores all objects of an obj-file object definition
|
||||||
struct Object
|
struct Object
|
||||||
{
|
{
|
||||||
enum ObjectType
|
enum ObjectType
|
||||||
|
@ -160,8 +160,8 @@ struct Material
|
||||||
aiString textureSpecularity;
|
aiString textureSpecularity;
|
||||||
aiString textureOpacity;
|
aiString textureOpacity;
|
||||||
aiString textureDisp;
|
aiString textureDisp;
|
||||||
enum TextureType
|
|
||||||
{
|
enum TextureType {
|
||||||
TextureDiffuseType = 0,
|
TextureDiffuseType = 0,
|
||||||
TextureSpecularType,
|
TextureSpecularType,
|
||||||
TextureAmbientType,
|
TextureAmbientType,
|
||||||
|
|
|
@ -70,6 +70,29 @@ namespace Assimp {
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
struct IOStreamBuffer {
|
||||||
|
BaseImporter *m_importer;
|
||||||
|
IOStream *m_stream;
|
||||||
|
size_t m_cacheSize;
|
||||||
|
std::vector<char> m_buffer;
|
||||||
|
size_t m_filesize;
|
||||||
|
size_t m_blockIndex;
|
||||||
|
IOStreamBuffer( BaseImporter *imp, IOStream *stream, size_t cache = 4096 )
|
||||||
|
: m_importer( imp )
|
||||||
|
, m_stream( stream )
|
||||||
|
, m_cacheSize( cache )
|
||||||
|
, m_buffer()
|
||||||
|
, m_filesize( 0 )
|
||||||
|
, m_blockIndex( 0 ) {
|
||||||
|
m_buffer.resize( m_cacheSize );
|
||||||
|
m_filesize = m_stream->FileSize() );
|
||||||
|
}
|
||||||
|
|
||||||
|
char &get( size_t index ) {
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Default constructor
|
// Default constructor
|
||||||
ObjFileImporter::ObjFileImporter() :
|
ObjFileImporter::ObjFileImporter() :
|
||||||
|
|
|
@ -50,8 +50,8 @@ struct aiNode;
|
||||||
namespace Assimp {
|
namespace Assimp {
|
||||||
|
|
||||||
namespace ObjFile {
|
namespace ObjFile {
|
||||||
struct Object;
|
struct Object;
|
||||||
struct Model;
|
struct Model;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue