mitsuba/src/converter/converter.h

41 lines
1.3 KiB
C
Raw Normal View History

#include <mitsuba/mitsuba.h>
using namespace mitsuba;
class GeometryConverter {
public:
inline GeometryConverter() {
m_srgb = false;
m_mapSmallerSide = true;
m_xres = m_yres = -1;
2010-08-14 03:09:48 +08:00
m_samplesPerPixel = 8;
2010-08-16 17:09:02 +08:00
m_fov = -1;
}
void convert(const std::string &inputFile,
const std::string &outputDirectory,
const std::string &sceneName,
const std::string &adjustmentFile);
virtual std::string locateResource(const std::string &resource) = 0;
2010-08-14 03:09:48 +08:00
inline void setSRGB(bool srgb) { m_srgb = srgb; }
inline void setMapSmallerSide(bool mapSmallerSide) { m_mapSmallerSide = mapSmallerSide; }
inline void setResolution(int xres, int yres) { m_xres = xres; m_yres = yres; }
inline void setSamplesPerPixel(int samplesPerPixel) { m_samplesPerPixel = samplesPerPixel; }
2010-08-16 17:09:02 +08:00
inline void setFov(Float fov) { m_fov = fov; }
2010-08-14 03:09:48 +08:00
inline const std::string &getFilename() const { return m_filename; }
private:
void convertCollada(const std::string &inputFile, std::ostream &os,
const std::string &textureDirectory,
const std::string &meshesDirectory);
void convertOBJ(const std::string &inputFile, std::ostream &os,
const std::string &textureDirectory,
const std::string &meshesDirectory);
public:
bool m_srgb, m_mapSmallerSide;
2010-08-14 03:09:48 +08:00
int m_xres, m_yres, m_samplesPerPixel;
2010-08-16 17:09:02 +08:00
Float m_fov;
2010-08-14 03:09:48 +08:00
std::string m_filename;
};