Commit 5993cf5d authored by Laurent Belcour's avatar Laurent Belcour

Got the BrdfExplorer export to work. The Jacobian evaluation is missing.

parent c7999f0c
......@@ -98,8 +98,6 @@ void ward_function::setParameters(const vec& p)
//! \todo finish.
vec ward_function::parametersJacobian(const vec& x) const
{
double dot = compute_dot(x);
vec jac(dimY()*nbParameters());
for(int i=0; i<dimY(); ++i)
{
......@@ -229,7 +227,7 @@ void ward_function::save_body(std::ostream& out, const arguments& args) const
out << "\tvec3 hax = dot(H,X) / ax;" << std::endl;
out << "\tvec3 hay = dot(H,Y) / ay;" << std::endl;
out << "\tfloat hn = dot(H,N);" << std::endl;
out << "\treturn (ks / (4 * M_PI * ax*ay * sqrt(dot(L,N)*dot(V,N))) * exp(-(hax*hax + hay*hay)/(hn*hn));" << std::endl;
out << "\treturn (ks / (4 * " << M_PI << " * ax*ay * sqrt(dot(L,N)*dot(V,N)))) * exp(-(hax*hax + hay*hay)/(hn*hn));" << std::endl;
out << "}" << std::endl;
}
}
......@@ -77,13 +77,6 @@ class ward_function : public nonlinear_function
//! \brief Set the number of output dimensions
void setDimY(int nY);
private: // methods
//! \brief Compute the cosine for inside the lobe function.
//! Depending on the lobe type, the dot product can have
//! different evaluations.
double compute_dot(const vec& in) const;
private: // data
vec _ks, _ax, _ay; // Lobes data
......
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