qvolray

diff src/volume.h @ 11:8990b5d2c7fe

moving to qt
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 09 Apr 2012 23:42:57 +0300
parents a6765984e057
children 17d9dc2edc91
line diff
     1.1 --- a/src/volume.h	Sun Apr 08 14:31:03 2012 +0300
     1.2 +++ b/src/volume.h	Mon Apr 09 23:42:57 2012 +0300
     1.3 @@ -1,15 +1,25 @@
     1.4  #ifndef VOLUME_H_
     1.5  #define VOLUME_H_
     1.6  
     1.7 -#include <stdint.h>
     1.8 +#include <list>
     1.9 +#include <string>
    1.10  
    1.11 -struct volume {
    1.12 +class Volume {
    1.13 +private:
    1.14  	int sz[3];
    1.15  	float zaspect;
    1.16 -	unsigned int tex_vol;
    1.17 +	unsigned int tex;
    1.18 +
    1.19 +	bool read_voldesc(const char *fname, std::list<std::string> *slist) const;
    1.20 +
    1.21 +public:
    1.22 +	Volume();
    1.23 +	~Volume();
    1.24 +
    1.25 +	bool load(const char *fname);
    1.26 +
    1.27 +	unsigned int get_texture() const;
    1.28 +	void bind(int tex_unit = 0) const;
    1.29  };
    1.30  
    1.31 -struct volume *load_volume(const char *fname);
    1.32 -void free_volume(struct volume *vol);
    1.33 -
    1.34  #endif	/* VOLUME_H_ */