OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
VolumeSettings.h
Go to the documentation of this file.
1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2009 Robert Osfield
2  *
3  * This library is open source and may be redistributed and/or modified under
4  * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5  * (at your option) any later version. The full license is in LICENSE file
6  * included with this distribution, and on the openscenegraph.org website.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * OpenSceneGraph Public License for more details.
12 */
13 
14 #ifndef OSGVOLUMESETTINGS
15 #define OSGVOLUMESETTINGS 1
16 
17 #include <osg/Object>
18 #include <osgVolume/Property>
19 
20 namespace osgVolume {
21 
23 {
24  public:
25 
27 
30 
32 
33  virtual void accept(PropertyVisitor& pv);
34  virtual void traverse(PropertyVisitor& pv);
35 
36  void setFilename(const std::string& str) { _filename = str; dirty(); }
37  const std::string& getFilename() const { return _filename; }
38 
39  enum Technique
40  {
43  MultiPass
44  };
45 
46  void setTechnique(Technique technique) { _technique = technique; dirty(); }
47  Technique getTechnique() const { return _technique; }
48 
50  {
54  MaximumIntensityProjection
55  };
56 
57  void setShadingModel(ShadingModel sm) { _shadingModel = sm; dirty(); }
58  ShadingModel getShadingModel() const { return _shadingModel; }
59 
60  void setSampleRatio(float sr) { _sampleRatioProperty->setValue(sr); dirty(); }
61  float getSampleRatio() const { return _sampleRatioProperty->getValue(); }
62 
63  void setSampleRatioWhenMoving(float sr) { _sampleRatioWhenMovingProperty->setValue(sr); dirty(); }
64  float getSampleRatioWhenMoving() const { return _sampleRatioWhenMovingProperty->getValue(); }
65 
66  void setCutoff(float co);
67  float getCutoff() const { return _cutoffProperty->getValue(); }
68 
69  void setTransparency(float t) { _transparencyProperty->setValue(t); dirty(); }
70  float getTransparency() const { return _transparencyProperty->getValue(); }
71 
72 
73  SampleRatioProperty* getSampleRatioProperty() { return _sampleRatioProperty.get(); }
74  const SampleRatioProperty* getSampleRatioProperty() const { return _sampleRatioProperty.get(); }
75 
76  SampleRatioWhenMovingProperty* getSampleRatioWhenMovingProperty() { return _sampleRatioWhenMovingProperty.get(); }
77  const SampleRatioWhenMovingProperty* getSampleRatioWhenMovingProperty() const { return _sampleRatioWhenMovingProperty.get(); }
78 
79  AlphaFuncProperty* getCutoffProperty() { return _cutoffProperty.get(); }
80  const AlphaFuncProperty* getCutoffProperty() const { return _cutoffProperty.get(); }
81 
82  TransparencyProperty* getTransparencyProperty() { return _transparencyProperty.get(); }
83  const TransparencyProperty* getTransparencyProperty() const { return _transparencyProperty.get(); }
84 
85  IsoSurfaceProperty* getIsoSurfaceProperty() { return _isoSurfaceProperty.get(); }
86  const IsoSurfaceProperty* getIsoSurfaceProperty() const { return _isoSurfaceProperty.get(); }
87 
88 protected:
89 
90  virtual ~VolumeSettings() {}
91 
92  std::string _filename;
93 
96 
102 };
103 
104 }
105 
106 #endif
AlphaFuncProperty * getCutoffProperty()
void setShadingModel(ShadingModel sm)
#define OSGVOLUME_EXPORT
Definition: Export.h:39
Technique getTechnique() const
osg::ref_ptr< IsoSurfaceProperty > _isoSurfaceProperty
const SampleRatioWhenMovingProperty * getSampleRatioWhenMovingProperty() const
const IsoSurfaceProperty * getIsoSurfaceProperty() const
void setTechnique(Technique technique)
osg::ref_ptr< SampleRatioWhenMovingProperty > _sampleRatioWhenMovingProperty
void setTransparency(float t)
#define META_Object(library, name)
Definition: Object.h:42
TransparencyProperty * getTransparencyProperty()
ShadingModel getShadingModel() const
void setSampleRatioWhenMoving(float sr)
const SampleRatioProperty * getSampleRatioProperty() const
osg::ref_ptr< SampleRatioProperty > _sampleRatioProperty
const std::string & getFilename() const
float getTransparency() const
float getSampleRatioWhenMoving() const
const TransparencyProperty * getTransparencyProperty() const
void setSampleRatio(float sr)
osg::ref_ptr< TransparencyProperty > _transparencyProperty
float getSampleRatio() const
void setFilename(const std::string &str)
osg::ref_ptr< AlphaFuncProperty > _cutoffProperty
SampleRatioWhenMovingProperty * getSampleRatioWhenMovingProperty()
IsoSurfaceProperty * getIsoSurfaceProperty()
const AlphaFuncProperty * getCutoffProperty() const
SampleRatioProperty * getSampleRatioProperty()