OpenWalnut  1.5.0dev
Public Types | Public Member Functions | Protected Attributes | List of all members
WGEPropertyUniform< T > Class Template Reference

Class implementing a uniform which can be controlled by a property instance. More...

#include <WGEPropertyUniform.h>

+ Inheritance diagram for WGEPropertyUniform< T >:
+ Collaboration diagram for WGEPropertyUniform< T >:

Public Types

typedef osg::ref_ptr< WGEPropertyUniformRefPtr
 Convenience typedef for an osg::ref_ptr. More...
 
typedef osg::ref_ptr< const WGEPropertyUniformConstRefPtr
 Convenience typedef for an osg::ref_ptr; const. More...
 
typedef WGEPropertyUniformCallback< T >::UniformType UniformType
 The type which is used for this uniform. More...
 

Public Member Functions

 WGEPropertyUniform (std::string name, T property)
 Creates a new uniform with controlled by the specified property. More...
 
virtual ~WGEPropertyUniform ()
 Destructor. More...
 

Protected Attributes

m_property
 The property controlling the uniform. More...
 
std::string m_name
 The name of the uniform. More...
 

Detailed Description

template<typename T>
class WGEPropertyUniform< T >

Class implementing a uniform which can be controlled by a property instance.

This is mainly a convenience class for WGEPropertyUniformCallback (which is used here).

Template Parameters
theclass used as controlling mechanism. The class needs to be a std::shared_ptr to a type supporting get() method: T->get() returns the value (bool, int, double, WPosition supported). For other types specialize the template.

Definition at line 45 of file WGEPropertyUniform.h.

Member Typedef Documentation

◆ ConstRefPtr

template<typename T >
typedef osg::ref_ptr< const WGEPropertyUniform > WGEPropertyUniform< T >::ConstRefPtr

Convenience typedef for an osg::ref_ptr; const.

Definition at line 56 of file WGEPropertyUniform.h.

◆ RefPtr

template<typename T >
typedef osg::ref_ptr< WGEPropertyUniform > WGEPropertyUniform< T >::RefPtr

Convenience typedef for an osg::ref_ptr.

Definition at line 51 of file WGEPropertyUniform.h.

◆ UniformType

template<typename T >
typedef WGEPropertyUniformCallback< T >::UniformType WGEPropertyUniform< T >::UniformType

The type which is used for this uniform.

Definition at line 74 of file WGEPropertyUniform.h.

Constructor & Destructor Documentation

◆ WGEPropertyUniform()

template<typename T >
WGEPropertyUniform< T >::WGEPropertyUniform ( std::string  name,
property 
)

Creates a new uniform with controlled by the specified property.

Parameters
namethe name of the uniform; consider our style guide for uniform names.
propertythe property controlling it

Definition at line 90 of file WGEPropertyUniform.h.

◆ ~WGEPropertyUniform()

template<typename T >
WGEPropertyUniform< T >::~WGEPropertyUniform
virtual

Destructor.

Definition at line 100 of file WGEPropertyUniform.h.

Member Data Documentation

◆ m_name

template<typename T >
std::string WGEPropertyUniform< T >::m_name
protected

The name of the uniform.

Definition at line 85 of file WGEPropertyUniform.h.

◆ m_property

template<typename T >
T WGEPropertyUniform< T >::m_property
protected

The property controlling the uniform.

Definition at line 80 of file WGEPropertyUniform.h.


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