ALTA  alpha
function.h
1 /* ALTA --- Analysis of Bidirectional Reflectance Distribution Functions
2 
3  Copyright (C) 2013, 2014, 2016 Inria
4 
5  This file is part of ALTA.
6 
7  This Source Code Form is subject to the terms of the Mozilla Public
8  License, v. 2.0. If a copy of the MPL was not distributed with this
9  file, You can obtain one at http://mozilla.org/MPL/2.0/. */
10 
11 #pragma once
12 
13 // Include STL
14 #include <vector>
15 #include <string>
16 
17 // Interface
18 #include <core/function.h>
19 #include <core/data.h>
20 #include <core/fitter.h>
21 #include <core/args.h>
22 #include <core/common.h>
23 
24 using namespace alta;
25 
37 {
38 
39  public: // methods
40 
42 
43  // Overload the function operator
44  virtual vec operator()(const vec& x) const ;
45  virtual vec value(const vec& x) const ;
46 
47  // Geometrical term of the microfacets
48  virtual vec G(const vec& x) const;
49 
51  virtual bool load(std::istream& in) ;
52 
54  virtual void save_call(std::ostream& out, const arguments& args) const;
55  virtual void save_body(std::ostream& out, const arguments& args) const;
56 
60  virtual void bootstrap(const ptr<data> d, const arguments& args);
61 
63  virtual int nbParameters() const ;
64 
66  virtual vec parameters() const ;
67 
69  virtual vec getParametersMin() const;
70 
72  virtual void setParameters(const vec& p) ;
73 
76  virtual vec parametersJacobian(const vec& x) const ;
77 
78  private: // data
79 
80  vec _ks; //Specular coefficients. One per color/wavelength
81  vec _a; // Roughness parameters. One per color/wavelength
82 
84 } ;
85 
A useful class for storing the high-level arguments of a program or a function.
Definition: args.h:34
Non-linear function interface.
Definition: function.h:152
a static class allowing to change from one parametrization to another.
Definition: params.h:42
A parameters object. Allow to define function object (either data or functions that are defined over ...
Definition: params.h:435
Definition: function.h:36
Definition: args.h:23