Commit bbe04e9b authored by Laurent Belcour's avatar Laurent Belcour

Adding a brdf file converter

parent 69c6daed
......@@ -237,7 +237,7 @@ function* plugins_manager::get_function(const std::string& filename)
linestream >> nX >> nY ;
}
else if(comment == std::string("CMD"))
{
{
args = arguments::create_arguments(line.substr(4, std::string::npos));
}
}
......
......@@ -56,7 +56,9 @@ void blinn_function::load(std::istream& in)
in >> token >> _N[i];
}
#ifdef DEBUG
std::cout << "<<DEBUG>> load parameters " << parameters() << std::endl;
#endif
}
//! Number of parameters to this non-linear function
......
CONFIG += qt \
console \
eigen
DESTDIR = ../../build
INCLUDEPATH += ../../
SOURCES += main.cpp
LIBS += -L../../build -lcore
unix{
PRE_TARGETDEPS += ../../build/libcore.a
LIBS += -ldl
}
#include <core/args.h>
#include <core/function.h>
#include <core/plugins_manager.h>
#include <QCoreApplication>
#include <QDir>
#include <QTime>
#include <iostream>
#include <vector>
#include <iostream>
#include <fstream>
#include <limits>
#include <cstdlib>
int main(int argc, char** argv)
{
QCoreApplication app(argc, argv);
arguments args(argc, argv) ;
if(! args.is_defined("input")) {
std::cerr << "<<ERROR>> the input filename is not defined" << std::endl ;
return 1 ;
}
if(! args.is_defined("output")) {
std::cerr << "<<ERROR>> the output filename is not defined" << std::endl ;
return 1 ;
}
// Load the function
function* f = plugins_manager::get_function(args["input"]);
// Save it
f->save(args["output"], args) ;
return 0 ;
}
......@@ -2,6 +2,7 @@ TEMPLATE = subdirs
SUBDIRS = generate_data \
data2brdf \
brdf2data \
brdf2brdf \
brdf2gnuplot \
data2gnuplot \
data2diff \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment