14#ifndef OSGVOLUME_PROPERTY
15#define OSGVOLUME_PROPERTY 1
29class CompositeProperty;
31class TransferFunctionProperty;
33class IsoSurfaceProperty;
34class MaximumIntensityProjectionProperty;
35class LightingProperty;
36class AlphaFuncProperty;
37class SampleRatioProperty;
38class SampleRatioWhenMovingProperty;
39class SampleDensityProperty;
40class SampleDensityWhenMovingProperty;
41class TransparencyProperty;
42class ExteriorTransparencyFactorProperty;
115 for(Properties::iterator itr =
_properties.begin();
The osgVolume library is a NodeKit that extends the core scene graph to support volume rendering.
Encapsulates OpenGL glAlphaFunc.
Definition AlphaFunc:24
virtual bool run(osg::Object *object, osg::Object *data)
Invoke the callback, first parameter is the Object that the callback is attached to,...
Definition Callback:80
NodeCallback()
Definition Callback:219
virtual NodeCallback * asNodeCallback()
Definition Callback:227
virtual DrawableEventCallback * asDrawableEventCallback()
Definition Callback:330
DrawableEventCallback()
Definition Callback:322
Copy Op(erator) used to control whether shallow or deep copy is used during copy construction and clo...
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
Visitor for type safe operations on osg::Nodes.
Definition NodeVisitor:82
Base class/standard interface for objects which require IO support, cloning and reference counting.
Definition Object:61
Smart pointer for handling referenced counted objects.
Definition ref_ptr:32
T * get() const
Definition ref_ptr:117
TransferFunction is a class that provide a 1D,2D or 3D colour look up table that can be used on the G...
Definition TransferFunction:31
Uniform encapsulates glUniform values.
Definition Uniform:414
EventHandler is base class for adding handling of events, either as node event callback,...
Definition EventHandler:34
virtual EventHandler * asEventHandler()
Definition EventHandler:52
Definition GUIActionAdapter:62
Event class for storing Keyboard, mouse and window events.
Definition GUIEventAdapter:82
GUIEventHandler provides a basic interface for any class which wants to handle a GUI Events.
Definition GUIEventHandler:50
virtual void apply(AlphaFuncProperty &)
virtual void apply(SampleDensityWhenMovingProperty &)
virtual void apply(ScalarProperty &)
virtual void apply(TransparencyProperty &)
virtual void apply(IsoSurfaceProperty &)
virtual void apply(CompositeProperty &)
virtual void apply(MaximumIntensityProjectionProperty &)
PropertyVisitor(bool traverseOnlyActiveChildren=true)
virtual void apply(SampleRatioWhenMovingProperty &)
virtual void apply(ExteriorTransparencyFactorProperty &)
virtual void apply(SwitchProperty &)
virtual void apply(VolumeSettings &)
virtual void apply(SampleDensityProperty &)
virtual void apply(TransferFunctionProperty &)
bool _traverseOnlyActiveChildren
Definition Property:70
virtual void apply(SampleRatioProperty &)
virtual void apply(Property &)
virtual void apply(LightingProperty &)
virtual ~PropertyVisitor()
Definition Property:51
META_Object(osgVolume, Property)
void setModifiedCount(unsigned int c)
Definition Property:87
Property(const Property &, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
Copy constructor using CopyOp to manage deep vs shallow copy.
virtual void accept(PropertyVisitor &pv)
Definition Property:90
void dirty()
Definition Property:85
unsigned int _modifiedCount
Definition Property:97
virtual void traverse(PropertyVisitor &)
Definition Property:91
unsigned int getModifiedCount() const
Definition Property:88
virtual void accept(PropertyVisitor &pv)
Definition Property:111
void addProperty(const osg::ref_ptr< T > &p)
Definition Property:137
unsigned int getNumProperties() const
Definition Property:141
void removeProperty(unsigned int i)
Definition Property:139
Properties _properties
Definition Property:148
CompositeProperty(const CompositeProperty &compositeProperty, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
Copy constructor using CopyOp to manage deep vs shallow copy.
Property * getProperty(unsigned int i)
Definition Property:131
void addProperty(Property *property)
Definition Property:135
virtual ~CompositeProperty()
Definition Property:145
META_Object(osgVolume, CompositeProperty)
const Property * getProperty(unsigned int i) const
Definition Property:133
virtual void traverse(PropertyVisitor &pv)
Definition Property:113
void setProperty(unsigned int i, Property *property)
Definition Property:127
std::vector< osg::ref_ptr< Property > > Properties
Definition Property:125
void setProperty(unsigned int i, const osg::ref_ptr< T > &p)
Definition Property:129
META_Object(osgVolume, SwitchProperty)
SwitchProperty(const SwitchProperty &switchProperty, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
Copy constructor using CopyOp to manage deep vs shallow copy.
virtual ~SwitchProperty()
Definition Property:190
void setActiveProperty(int i)
Set which child property is active.
Definition Property:183
virtual void traverse(PropertyVisitor &pv)
Definition Property:165
virtual void accept(PropertyVisitor &pv)
Definition Property:163
int _activeProperty
Definition Property:192
int getActiveProperty() const
Get the active property.
Definition Property:186
META_Object(osgVolume, TransferFunctionProperty)
osg::ref_ptr< osg::TransferFunction > _tf
Definition Property:221
osg::TransferFunction * getTransferFunction()
Get the transfer function.
Definition Property:212
const osg::TransferFunction * getTransferFunction() const
Get the const transfer function.
Definition Property:215
virtual ~TransferFunctionProperty()
Definition Property:219
void setTransferFunction(osg::TransferFunction *tf)
Set the transfer function.
Definition Property:209
virtual void accept(PropertyVisitor &pv)
Definition Property:206
TransferFunctionProperty(const TransferFunctionProperty &tfp, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
Copy constructor using CopyOp to manage deep vs shallow copy.
TransferFunctionProperty(osg::TransferFunction *tf=0)
virtual ~ScalarProperty()
Definition Property:252
ScalarProperty(const ScalarProperty &scalarProperty, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
ScalarProperty(const std::string &scaleName, float value)
osg::ref_ptr< osg::Uniform > _uniform
Definition Property:256
const osg::Uniform * getUniform() const
Get the underlying uniform.
Definition Property:248
virtual void setValue(float v)
Set the value.
Definition Property:239
osg::Uniform * getUniform()
Get the underlying uniform.
Definition Property:245
float getValue() const
Get the value.
Definition Property:242
virtual void accept(PropertyVisitor &pv)
Definition Property:236
META_Object(osgVolume, ScalarProperty)
META_Object(osgVolume, IsoSurfaceProperty)
IsoSurfaceProperty(const IsoSurfaceProperty &isp, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
IsoSurfaceProperty(float value=1.0f)
virtual ~IsoSurfaceProperty()
Definition Property:274
virtual void accept(PropertyVisitor &pv)
Definition Property:270
virtual ~AlphaFuncProperty()
Definition Property:298
virtual void accept(PropertyVisitor &pv)
Definition Property:287
virtual void setValue(float v)
Set the value.
AlphaFuncProperty(const AlphaFuncProperty &isp, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
META_Object(osgVolume, AlphaFuncProperty)
const osg::AlphaFunc * getAlphaFunc() const
Definition Property:293
osg::ref_ptr< osg::AlphaFunc > _alphaFunc
Definition Property:300
osg::AlphaFunc * getAlphaFunc()
Definition Property:291
AlphaFuncProperty(float value=1.0f)
MaximumIntensityProjectionProperty(const MaximumIntensityProjectionProperty &mipp, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
virtual void accept(PropertyVisitor &pv)
Definition Property:313
virtual ~MaximumIntensityProjectionProperty()
Definition Property:317
MaximumIntensityProjectionProperty()
META_Object(osgVolume, MaximumIntensityProjectionProperty)
virtual void accept(PropertyVisitor &pv)
Definition Property:331
META_Object(osgVolume, LightingProperty)
virtual ~LightingProperty()
Definition Property:335
LightingProperty(const LightingProperty &mipp, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
Sample density to use when the volume is static relative to the eye point or when moving if no Sample...
Definition Property:341
META_Object(osgVolume, SampleDensityProperty)
SampleDensityProperty(float value=1.0f)
SampleDensityProperty(const SampleDensityProperty &isp, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
virtual ~SampleDensityProperty()
Definition Property:354
virtual void accept(PropertyVisitor &pv)
Definition Property:350
Sample density to use when the volume is moving relative to the eye point.
Definition Property:359
virtual ~SampleDensityWhenMovingProperty()
Definition Property:372
SampleDensityWhenMovingProperty(const SampleDensityWhenMovingProperty &isp, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
virtual void accept(PropertyVisitor &pv)
Definition Property:368
META_Object(osgVolume, SampleDensityWhenMovingProperty)
SampleDensityWhenMovingProperty(float value=1.0f)
Sample ratioto use when the volume is static relative to the eye point or when moving if no SampleRat...
Definition Property:377
virtual ~SampleRatioProperty()
Definition Property:390
META_Object(osgVolume, SampleRatioProperty)
SampleRatioProperty(const SampleRatioProperty &isp, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
SampleRatioProperty(float value=1.0f)
virtual void accept(PropertyVisitor &pv)
Definition Property:386
Sample density to use when the volume is moving relative to the eye point.
Definition Property:395
META_Object(osgVolume, SampleRatioWhenMovingProperty)
SampleRatioWhenMovingProperty(float value=1.0f)
virtual void accept(PropertyVisitor &pv)
Definition Property:404
virtual ~SampleRatioWhenMovingProperty()
Definition Property:408
SampleRatioWhenMovingProperty(const SampleRatioWhenMovingProperty &isp, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
virtual ~TransparencyProperty()
Definition Property:426
TransparencyProperty(float value=1.0f)
META_Object(osgVolume, TransparencyProperty)
TransparencyProperty(const TransparencyProperty &isp, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
virtual void accept(PropertyVisitor &pv)
Definition Property:422
virtual void accept(PropertyVisitor &pv)
Definition Property:439
ExteriorTransparencyFactorProperty(const ExteriorTransparencyFactorProperty &isp, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
virtual ~ExteriorTransparencyFactorProperty()
Definition Property:443
ExteriorTransparencyFactorProperty(float value=0.0f)
META_Object(osgVolume, ExteriorTransparencyFactorProperty)
CollectPropertiesVisitor(bool traverseOnlyActiveChildren=true)
osg::ref_ptr< AlphaFuncProperty > _afProperty
Definition Property:468
osg::ref_ptr< SampleRatioProperty > _sampleRatioProperty
Definition Property:473
virtual void apply(SampleRatioProperty &sdp)
osg::ref_ptr< ExteriorTransparencyFactorProperty > _exteriorTransparencyFactorProperty
Definition Property:476
osg::ref_ptr< TransferFunctionProperty > _tfProperty
Definition Property:466
virtual void apply(ExteriorTransparencyFactorProperty &tp)
virtual void apply(ScalarProperty &)
virtual void apply(IsoSurfaceProperty &iso)
osg::ref_ptr< SampleRatioWhenMovingProperty > _sampleRatioWhenMovingProperty
Definition Property:474
osg::ref_ptr< SampleDensityWhenMovingProperty > _sampleDensityWhenMovingProperty
Definition Property:472
virtual void apply(SampleRatioWhenMovingProperty &sdp)
virtual void apply(SampleDensityWhenMovingProperty &sdp)
osg::ref_ptr< IsoSurfaceProperty > _isoProperty
Definition Property:467
osg::ref_ptr< SampleDensityProperty > _sampleDensityProperty
Definition Property:471
virtual void apply(TransferFunctionProperty &)
osg::ref_ptr< TransparencyProperty > _transparencyProperty
Definition Property:475
osg::ref_ptr< MaximumIntensityProjectionProperty > _mipProperty
Definition Property:469
virtual void apply(AlphaFuncProperty &af)
virtual void apply(TransparencyProperty &tp)
virtual void apply(LightingProperty &lp)
virtual void apply(MaximumIntensityProjectionProperty &mip)
osg::ref_ptr< LightingProperty > _lightingProperty
Definition Property:470
virtual void apply(SampleDensityProperty &sdp)
virtual const osgGA::EventHandler * asEventHandler() const
Definition Property:497
void setKeyEventActivatesSampleDensityAdjustment(int key)
Definition Property:513
int getKeyEventActivatesAlphaFuncAdjustment() const
Definition Property:517
PropertyAdjustmentCallback()
int _sampleDensityKey
Definition Property:526
int _exteriorTransparencyFactorKey
Definition Property:524
int getKeyEventActivatesSampleDensityAdjustment() const
Definition Property:514
bool _updateTransparency
Definition Property:528
void setKeyEventActivatesAlphaFuncAdjustment(int key)
Definition Property:516
bool _updateAlphaCutOff
Definition Property:530
int _cyleBackwardKey
Definition Property:522
void setKeyEventActivatesTransparencyAdjustment(int key)
Definition Property:507
META_Object(osgVolume, PropertyAdjustmentCallback)
virtual osgGA::EventHandler * asEventHandler()
Definition Property:496
int getKeyEventCycleForward() const
Definition Property:502
virtual DrawableEventCallback * asDrawableEventCallback()
Definition Property:493
int getKeyEventActivatesTransparencyAdjustment() const
Definition Property:508
int _cyleForwardKey
Definition Property:521
int getKeyEventActivatesExteriorTransparencyFactorAdjustment() const
Definition Property:511
void setKeyEventCycleBackward(int key)
Definition Property:504
int getKeyEventCycleBackward() const
Definition Property:505
PropertyAdjustmentCallback(const PropertyAdjustmentCallback &, const osg::CopyOp &)
virtual const DrawableEventCallback * asDrawableEventCallback() const
Definition Property:494
virtual const NodeCallback * asNodeCallback() const
Definition Property:491
virtual bool run(osg::Object *object, osg::Object *data)
NodeCallback overrides the Callback::run() method to adapt it the old style NodeCallback::operator()(...
Definition Property:499
virtual bool handle(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &, osg::Object *object, osg::NodeVisitor *)
Handle events, return true if handled, false otherwise.
bool _updateExteriorTransparencyFactor
Definition Property:529
int _transparencyKey
Definition Property:523
void setKeyEventCycleForward(int key)
Definition Property:501
virtual NodeCallback * asNodeCallback()
Definition Property:490
void setKeyEventActivatesExteriorTransparencyFactorAdjustment(int key)
Definition Property:510
bool _updateSampleDensity
Definition Property:531
int _alphaFuncKey
Definition Property:525
Definition VolumeSettings:23
#define OSGVOLUME_EXPORT
Definition Export:39