glviewvol

view src/renderer.h @ 4:04330eb80b36

lots of stuff
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 29 Dec 2014 05:41:36 +0200
parents 7bdf40403b9c
children 5417c25cb238
line source
1 #ifndef RENDERER_H_
2 #define RENDERER_H_
4 #include "volume.h"
5 #include "curve.h"
7 #define MAX_CLIP_PLANES 4
9 class Renderer {
10 protected:
11 int view_width, view_height;
12 Volume *vol;
14 float clip_plane[MAX_CLIP_PLANES][4]; // nx,ny,nz,dist
16 Curve xfer[3]; // rgb transfer function
18 public:
19 Renderer();
20 virtual ~Renderer();
22 virtual bool init();
23 virtual void destroy();
25 virtual void set_volume(Volume *vol);
26 virtual Volume *get_volume() const;
28 virtual Curve &transfer_curve(int color);
29 virtual const Curve &transfer_curve(int color) const;
31 virtual void set_clipping_plane(int idx, float nx, float ny, float nz, float dist);
32 virtual void disable_clipping_plane(int idx);
34 virtual void reshape(int x, int y);
36 virtual void update(unsigned int msec);
37 virtual void render() const = 0;
38 };
40 #endif // RENDERER_H_