data.h 1.26 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
/* ALTA --- Analysis of Bidirectional Reflectance Distribution Functions

   Copyright (C) 2013, 2014 Inria

   This file is part of ALTA.

   This Source Code Form is subject to the terms of the Mozilla Public
   License, v. 2.0.  If a copy of the MPL was not distributed with this
   file, You can obtain one at http://mozilla.org/MPL/2.0/.  */

11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
#pragma once

#include <core/data.h>
#include <core/common.h>
#include <core/args.h>

class data_brdf_slice : public data
{
	public: // methods

		data_brdf_slice();
		~data_brdf_slice();

		// Load data from a file
		virtual void load(const std::string& filename) ;
		virtual void load(const std::string& filename, const arguments& args) ;

		virtual void save(const std::string& filename) const ;

		// Acces to data
		virtual vec get(int i) const ;
		virtual vec operator[](int i) const ;

34
		virtual vec value(const vec& x) const;
35 36

		// Set data
37 38
		virtual void set(int i, const vec& x);
		virtual void set(const vec& x);
39 40 41 42 43 44 45 46 47 48 49 50

		// Get data size, e.g. the number of samples to fit
		virtual int size() const ;

		// Get min and max input space values
		virtual vec min() const ;
		virtual vec max() const ;

		virtual int dimX() const ; 
		virtual int dimY() const ; 

	private: // data
51
		double* _data;
52
		int width, height;
53
		int slice;
54 55

} ;