openscenegraph
VolumeSettings
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
20namespace 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
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
88protected:
89
90 virtual ~VolumeSettings() {}
91
92 std::string _filename;
93
96
102};
103
104}
105
106#endif
Definition Property:278
Definition Property:261
Definition Property:46
Definition Property:75
Definition Property:377
Definition Property:413
Definition VolumeSettings:23
std::string _filename
Definition VolumeSettings:92
ShadingModel _shadingModel
Definition VolumeSettings:95
void setSampleRatioWhenMoving(float sr)
Definition VolumeSettings:63
osg::ref_ptr< SampleRatioProperty > _sampleRatioProperty
Definition VolumeSettings:97
SampleRatioWhenMovingProperty * getSampleRatioWhenMovingProperty()
Definition VolumeSettings:76
TransparencyProperty * getTransparencyProperty()
Definition VolumeSettings:82
Technique _technique
Definition VolumeSettings:94
SampleRatioProperty * getSampleRatioProperty()
Definition VolumeSettings:73
const IsoSurfaceProperty * getIsoSurfaceProperty() const
Definition VolumeSettings:86
void setTransparency(float t)
Definition VolumeSettings:69
void setCutoff(float co)
const SampleRatioWhenMovingProperty * getSampleRatioWhenMovingProperty() const
Definition VolumeSettings:77
osg::ref_ptr< SampleRatioWhenMovingProperty > _sampleRatioWhenMovingProperty
Definition VolumeSettings:98
VolumeSettings(const VolumeSettings &, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
virtual ~VolumeSettings()
Definition VolumeSettings:90
IsoSurfaceProperty * getIsoSurfaceProperty()
Definition VolumeSettings:85
META_Object(osgVolume, VolumeSettings)
osg::ref_ptr< AlphaFuncProperty > _cutoffProperty
Definition VolumeSettings:99
void setTechnique(Technique technique)
Definition VolumeSettings:46
ShadingModel
Definition VolumeSettings:50
@ Isosurface
Definition VolumeSettings:53
@ Standard
Definition VolumeSettings:51
@ Light
Definition VolumeSettings:52
float getCutoff() const
Definition VolumeSettings:67
virtual void traverse(PropertyVisitor &pv)
const SampleRatioProperty * getSampleRatioProperty() const
Definition VolumeSettings:74
AlphaFuncProperty * getCutoffProperty()
Definition VolumeSettings:79
float getTransparency() const
Definition VolumeSettings:70
Technique
Definition VolumeSettings:40
@ RayTraced
Definition VolumeSettings:42
@ FixedFunction
Definition VolumeSettings:41
void setFilename(const std::string &str)
Definition VolumeSettings:36
Technique getTechnique() const
Definition VolumeSettings:47
const AlphaFuncProperty * getCutoffProperty() const
Definition VolumeSettings:80
virtual void accept(PropertyVisitor &pv)
float getSampleRatio() const
Definition VolumeSettings:61
void setShadingModel(ShadingModel sm)
Definition VolumeSettings:57
float getSampleRatioWhenMoving() const
Definition VolumeSettings:64
const std::string & getFilename() const
Definition VolumeSettings:37
osg::ref_ptr< IsoSurfaceProperty > _isoSurfaceProperty
Definition VolumeSettings:101
void setSampleRatio(float sr)
Definition VolumeSettings:60
ShadingModel getShadingModel() const
Definition VolumeSettings:58
const TransparencyProperty * getTransparencyProperty() const
Definition VolumeSettings:83
osg::ref_ptr< TransparencyProperty > _transparencyProperty
Definition VolumeSettings:100
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
Definition ref_ptr:32
#define OSGVOLUME_EXPORT
Definition osgVolume/Export:39