Obj-Importer: start new streaming handling.

pull/1043/head
Kim Kulling 2016-10-07 09:19:10 +02:00
parent b61aaf7ec4
commit 0bae2bbfa7
3 changed files with 28 additions and 5 deletions

View File

@ -104,7 +104,7 @@ struct Face
// ------------------------------------------------------------------------------------------------
//! \struct Object
//! \brief Stores all objects of an objfile object definition
//! \brief Stores all objects of an obj-file object definition
struct Object
{
enum ObjectType
@ -160,8 +160,8 @@ struct Material
aiString textureSpecularity;
aiString textureOpacity;
aiString textureDisp;
enum TextureType
{
enum TextureType {
TextureDiffuseType = 0,
TextureSpecularType,
TextureAmbientType,

View File

@ -70,6 +70,29 @@ namespace Assimp {
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
ObjFileImporter::ObjFileImporter() :

View File

@ -50,8 +50,8 @@ struct aiNode;
namespace Assimp {
namespace ObjFile {
struct Object;
struct Model;
struct Object;
struct Model;
}
// ------------------------------------------------------------------------------------------------