25 #ifndef WDATASETSINGLE_H
26 #define WDATASETSINGLE_H
31 #include <osg/ref_ptr>
35 #include "WGridRegular3D.h"
36 #include "WValueSet.h"
50 typedef std::shared_ptr< WDataSetSingle >
SPtr;
55 typedef std::shared_ptr< const WDataSetSingle >
ConstSPtr;
64 std::shared_ptr< WGrid > newGrid );
85 virtual WDataSetSingle::SPtr clone( std::shared_ptr< WValueSetBase > newValueSet, std::shared_ptr< WGrid > newGrid )
const;
118 std::shared_ptr< WValueSetBase >
getValueSet()
const;
123 std::shared_ptr< WGrid >
getGrid()
const;
178 virtual osg::ref_ptr< WDataTexture3D >
getTexture()
const;
185 virtual const std::string
getName()
const;
226 return getSingleRawValue< T >(
id );
231 std::shared_ptr< WValueSet< T > > vs = std::dynamic_pointer_cast< WValueSet< T > >(
m_valueSet );
232 return vs->getScalar(
id );
A data set consisting of a set of values based on a grid.
std::shared_ptr< WValueSetBase > getValueSet() const
WDataSetSingle()
Construct an empty and unusable instance.
virtual const std::string getDescription() const
Gets the description for this prototype.
virtual const std::string getName() const
Gets the name of this prototype.
virtual bool isTexture() const
Determines whether this dataset can be used as a texture.
virtual WDataSetSingle::SPtr clone() const
Creates a copy (clone) of this instance.
std::shared_ptr< const WDataSetSingle > ConstSPtr
Convenience typedef for a std::shared_ptr; const.
OW_API_DEPRECATED T getValueAt(size_t id)
Get the scalar value stored at id-th position of the array of the value set.
static std::shared_ptr< WPrototyped > getPrototype()
Returns a prototype instantiated with the true type of the deriving class.
std::shared_ptr< WGrid > m_grid
Stores the reference of the WGrid of this DataSetSingle instance.
osg::ref_ptr< WDataTexture3D > m_texture
The 3D texture representing this dataset.
static std::shared_ptr< WPrototyped > m_prototype
The prototype as singleton.
virtual osg::ref_ptr< WDataTexture3D > getTexture() const
Returns the texture representation of the dataset.
std::shared_ptr< WGrid > getGrid() const
double getSingleRawValue(size_t id) const
Get the raw scalar value stored at id-th position of the raw array of the value set.
std::shared_ptr< WValueSetBase > m_valueSet
Stores the reference of the WValueSet of this DataSetSingle instance.
std::shared_ptr< WDataSetSingle > SPtr
Convenience typedef for a std::shared_ptr.
virtual ~WDataSetSingle()
Destroys this DataSet instance.
Base class for all data set types.
This class allows simple creation of WGETexture3D by using a specified grid and value-set.
#define OW_API_DEPRECATED
In order to mark functions for the compiler as deprecated we need to put this before each deprecated ...