source: nanovis/trunk/PlaneRenderer.h @ 4587

Last change on this file since 4587 was 3613, checked in by ldelgass, 7 years ago

Include namespace in header guard defines

  • Property svn:eol-style set to native
File size: 1.1 KB
Line 
1/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2/*
3 *  Copyright (c) 2004-2013  HUBzero Foundation, LLC
4 *
5 *  Authors:
6 *    Wei Qiao <qiaow@purdue.edu>
7 */
8#ifndef NV_PLANE_RENDERER_H
9#define NV_PLANE_RENDERER_H
10
11#include <vector>
12
13#include "ColorTableShader.h"
14#include "TransferFunction.h"
15#include "Texture2D.h"
16
17namespace nv {
18
19class PlaneRenderer
20{
21public:
22    PlaneRenderer(int width, int height);
23
24    ~PlaneRenderer();
25
26    /// Add a plane and its transfer function.
27    int addPlane(Texture2D *p, TransferFunction *tf);
28
29    void removePlane(int index);
30
31    /// Set the active plane to be rendered
32    void setActivePlane(int index);
33
34    /// Change the rendering size
35    void setScreenSize(int w, int h);
36
37    void render();
38
39private:
40    std::vector<Texture2D *> _plane;     ///< Array of images
41    std::vector<TransferFunction *> _tf; ///< Array of corresponding transfer functions
42    int _activePlane;                    ///< The active plane, only one is rendered
43    int _numPlanes;
44
45    int _renderWidth;
46    int _renderHeight; 
47
48    ColorTableShader *_shader;
49};
50
51}
52
53#endif
Note: See TracBrowser for help on using the repository browser.