source: trunk/packages/vizservers/vtkvis/RpVolume.h @ 2261

Last change on this file since 2261 was 2261, checked in by ldelgass, 13 years ago

Add GPU volume rendering support to vtkvis render server

  • Property svn:eol-style set to native
File size: 1.4 KB
Line 
1/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2/*
3 * Copyright (C) 2011, Purdue Research Foundation
4 *
5 * Author: Leif Delgass <ldelgass@purdue.edu>
6 */
7
8#ifndef __RAPPTURE_VTKVIS_VOLUME_H__
9#define __RAPPTURE_VTKVIS_VOLUME_H__
10
11#include <vtkSmartPointer.h>
12#include <vtkProp.h>
13#include <vtkVolume.h>
14#include <vtkAbstractVolumeMapper.h>
15#include <vtkPlaneCollection.h>
16
17#include "RpVtkDataSet.h"
18#include "ColorMap.h"
19
20namespace Rappture {
21namespace VtkVis {
22
23/**
24 * \brief Volume Rendering
25 */
26class Volume {
27public:
28    enum BlendMode {
29        COMPOSITE = 0,
30        MAX_INTENSITY,
31        MIN_INTENSITY
32    };
33
34    Volume();
35    virtual ~Volume();
36
37    void setDataSet(DataSet *dataset);
38
39    DataSet *getDataSet();
40
41    vtkProp *getProp();
42
43    void setColorMap(ColorMap *cmap);
44    void setColorMap(ColorMap *cmap, double dataRange[2]);
45
46    ColorMap *getColorMap();
47
48    void setOpacity(double opacity);
49
50    void setVisibility(bool state);
51
52    bool getVisibility();
53
54    void setClippingPlanes(vtkPlaneCollection *planes);
55
56    void setAmbient(double coeff);
57
58    void setDiffuse(double coeff);
59
60    void setSpecular(double coeff, double power);
61
62    void setLighting(bool state);
63
64private:
65    void initProp();
66    void update();
67
68    DataSet *_dataSet;
69    double _opacity;
70
71    ColorMap *_colorMap;
72    vtkSmartPointer<vtkVolume> _volumeProp;
73    vtkSmartPointer<vtkAbstractVolumeMapper> _volumeMapper;
74};
75
76}
77}
78
79#endif
Note: See TracBrowser for help on using the repository browser.