Added a working makefile for mingw, provides more configs now. Not perfect yet. Added decompression part of zlib (inflate). Moved IrrXML to ./contrib dir. Moved some IRR/IRRmesh shared code. FIXME: makefile for gnu/linux is untested yet. Code cleanup. Unified #ifndef ASSIMP_BUILD_nnn_IMPORTER directives. OBJ loader supports map_bump, map_ka, map_ks, map_ns now. Endianess conversion in the ply loader is correct now. Changed IRR/IRRMESH coordinate system conversion. Not absolutely right now, but better than before. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@305 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
51 lines
1.2 KiB
C++
51 lines
1.2 KiB
C++
|
|
#ifndef INCLUDED_AI_IRRXML_WRAPPER
|
|
#define INCLUDED_AI_IRRXML_WRAPPER
|
|
|
|
// some long includes ....
|
|
#include "./../contrib/irrXML/irrXML.h"
|
|
#include "./../include/IOStream.h"
|
|
|
|
namespace Assimp {
|
|
using namespace irr;
|
|
using namespace irr::io;
|
|
|
|
// ---------------------------------------------------------------------------------
|
|
/** @brief Utility class to make IrrXML work together with our custom IO system
|
|
*
|
|
* See the IrrXML docs for more details.
|
|
*/
|
|
class CIrrXML_IOStreamReader
|
|
{
|
|
public:
|
|
|
|
//! Construction from an existing IOStream
|
|
CIrrXML_IOStreamReader(IOStream* _stream)
|
|
: stream (_stream)
|
|
{}
|
|
|
|
//! Virtual destructor
|
|
virtual ~CIrrXML_IOStreamReader() {};
|
|
|
|
//! Reads an amount of bytes from the file.
|
|
/** @param buffer: Pointer to output buffer.
|
|
* @param sizeToRead: Amount of bytes to read
|
|
* @return Returns how much bytes were read.
|
|
*/
|
|
virtual int read(void* buffer, int sizeToRead) {
|
|
return (int)stream->Read(buffer,1,sizeToRead);
|
|
}
|
|
|
|
//! Returns size of file in bytes
|
|
virtual int getSize() {
|
|
return (int)stream->FileSize();
|
|
}
|
|
|
|
private:
|
|
IOStream* stream;
|
|
}; // ! class CIrrXML_IOStreamReader
|
|
|
|
} // ! Assimp
|
|
|
|
#endif // !! INCLUDED_AI_IRRXML_WRAPPER
|