// Copyright (C) 2004-2009 Christoph Kubisch & Eike Decker
// This file is part of the "Luxinia Engine".
// For conditions of distribution and use, see copyright notice in luxiniapublicsdk.txt

#ifndef __EXMODEL_OUTPUT_H__
#define __EXMODEL_OUTPUT_H__

#include "luxexmodel/exmodel.h"
#include "luxmath/basetypes.h"
#include <iostream>
#include <sstream>


struct EXOutBuffer {
	std::ostringstream oss; 
};

class EXModelOutput
{
public:
	virtual booln	Export(EXModelPTR model, std::ostream &outstream) = 0;
};

class EXAnimOutput
{
public:
	virtual booln	Export(EXAnimPTR model, std::ostream &outstream) = 0;
};

LUX_INLINE void vfwrite(const void *data,size_t size, size_t cnt, std::ostream &outstream){
	outstream.write((const char*)data, size * cnt);
}

LUX_INLINE void vfprint(const char *data, std::ostream &outstream){
	outstream.write((const char*)data, strlen(data));
}

LUX_INLINE void vfprintfloat(const float data, std::ostream &outstream){
	outstream << data;
}

LUX_INLINE void vfprintuint(const uint data, std::ostream &outstream){
	outstream << data;
}

#endif

