OpenWalnut  1.4.0
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
WDataTexture3D Class Reference

This class allows simple creation of WGETexture3D by using a specified grid and value-set. More...

#include <WDataTexture3D.h>

+ Inheritance diagram for WDataTexture3D:

List of all members.

Public Member Functions

 WDataTexture3D (boost::shared_ptr< WValueSetBase > valueSet, boost::shared_ptr< WGridRegular3D > grid)
 Constructor.
virtual ~WDataTexture3D ()
 Destructor.
virtual WBoundingBox getBoundingBox () const
 Returns the texture's bounding box.

Protected Member Functions

virtual void create ()
 Creates the texture data.

Private Member Functions

template<typename T >
osg::ref_ptr< osg::Image > createTexture (T *source, int components=1)
 Creates a properly sized osg::Image from the specified source data.

Private Attributes

boost::shared_ptr< WValueSetBasem_valueSet
 The value set from which the texture gets created.
WBoundingBox m_boundingBox
 The bounding box of the underlying grid.
boost::shared_mutex m_creationLock
 The lock for securing createTexture.

Detailed Description

This class allows simple creation of WGETexture3D by using a specified grid and value-set.

One advantage: the first call to the texture's update callback ensures texture creation. It is not created earlier.

Definition at line 96 of file WDataTexture3D.h.


Constructor & Destructor Documentation

WDataTexture3D::WDataTexture3D ( boost::shared_ptr< WValueSetBase valueSet,
boost::shared_ptr< WGridRegular3D grid 
)

Destructor.

Definition at line 74 of file WDataTexture3D.cpp.


Member Function Documentation

void WDataTexture3D::create ( ) [protected, virtual]

Creates the texture data.

This method creates the texture during the first update traversal using the value set and grid.

Reimplemented from WGETexture< TextureType >.

Definition at line 79 of file WDataTexture3D.cpp.

References createTexture(), wlog::debug(), wlog::error(), and m_valueSet.

template<typename T >
osg::ref_ptr< osg::Image > WDataTexture3D::createTexture ( T *  source,
int  components = 1 
) [private]

Creates a properly sized osg::Image from the specified source data.

Parameters:
sourcethe source data
componentsnumber of components
Template Parameters:
Tthe type of source data
Returns:

Definition at line 180 of file WDataTexture3D.h.

References wlog::debug(), wlog::error(), m_creationLock, WGETexture< TextureType >::minimum(), WGETexture< TextureType >::scale(), and WDataTexture3DScalers::scaleInterval().

Referenced by create().

Returns the texture's bounding box.

This is const. Although there exists the transformation() property, it is an information property and can't be changed. This represents the underlying grid.

Returns:
the bounding box.

Reimplemented from WGETexture< TextureType >.

Definition at line 173 of file WDataTexture3D.cpp.

References m_boundingBox.


Member Data Documentation

The bounding box of the underlying grid.

Definition at line 135 of file WDataTexture3D.h.

Referenced by getBoundingBox().

boost::shared_mutex WDataTexture3D::m_creationLock [private]

The lock for securing createTexture.

Definition at line 140 of file WDataTexture3D.h.

Referenced by createTexture().

boost::shared_ptr< WValueSetBase > WDataTexture3D::m_valueSet [private]

The value set from which the texture gets created.

Definition at line 130 of file WDataTexture3D.h.

Referenced by create().


The documentation for this class was generated from the following files: