source: trunk/packages/vizservers/nanovis/PlaneRenderer.h @ 3502

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

Add basic VTK structured points reader to nanovis, update copyright dates.

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