Commit c0f15e40 authored by Laurent Belcour's avatar Laurent Belcour

Updating the Schlick Fresnel to have parameters boundaries

parent 2bb701f5
......@@ -40,9 +40,17 @@ void schlick::load(std::istream& in)
void schlick::save_call(std::ostream& out, const arguments& args) const
{
out << "("; f->save_call(out, args); out << ")";
bool is_alta = !args.is_defined("export") || args["export"] == "alta";
if(is_alta)
{
out << "("; f->save_call(out, args); out << ")";
}
else
{
f->save_call(out, args);
}
if(is_alta)
{
out << "#FUNC nonlinear_fresnel_schlick" << std::endl ;
......
......@@ -36,6 +36,22 @@ class schlick : public fresnel
//! \brief Update the vector of parameters for the function
virtual void setFresnelParameters(const vec& p) ;
//! Get the vector of min parameters for the function
virtual vec getFresnelParametersMin() const
{
vec m(1);
m[0] = 0.0;
return m;
}
//! Get the vector of min parameters for the function
virtual vec getFresnelParametersMax() const
{
vec M(1);
M[0] = 1.0;
return M;
}
//! \brief Obtain the derivatives of the function with respect to the
//! parameters.
virtual vec getFresnelParametersJacobian(const vec& x) const ;
......
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