Public Member Functions | Private Attributes | List of all members
SurgSim::Graphics::OsgUniform< T > Class Template Reference

OSG implementation of graphics uniform with a value of type T. More...

#include <SurgSim/Graphics/OsgCamera.h>

Public Member Functions

 OsgUniform (const std::string &name)
 Constructor. More...
 
virtual void set (const T &value)
 Sets the value of the uniform. More...
 
virtual void set (const YAML::Node &node)
 Sets the value of the uniform from a YAML Node doing the correct conversion. More...
 
virtual const T & get () const
 

Private Attributes

m_value
 Value of the uniform. More...
 

Detailed Description

template<class T>
class SurgSim::Graphics::OsgUniform< T >

OSG implementation of graphics uniform with a value of type T.

Template Parameters
Valuethe value type of the uniform

Constructor & Destructor Documentation

◆ OsgUniform()

template<class T >
SurgSim::Graphics::OsgUniform< T >::OsgUniform ( const std::string name)
explicit

Constructor.

Parameters
nameName used in shader code to access this uniform

Member Function Documentation

◆ get()

template<class T >
const T & SurgSim::Graphics::OsgUniform< T >::get
virtual
Returns
the value of the uniform

◆ set() [1/2]

template<class T >
void SurgSim::Graphics::OsgUniform< T >::set ( const T &  value)
virtual

Sets the value of the uniform.

Parameters
valuethe value for this uniform

◆ set() [2/2]

template<class T >
void SurgSim::Graphics::OsgUniform< T >::set ( const YAML::Node &  node)
virtual

Sets the value of the uniform from a YAML Node doing the correct conversion.

Parameters
nodethe node that contains the value for this uniform

Member Data Documentation

◆ m_value

template<class T >
T SurgSim::Graphics::OsgUniform< T >::m_value
private

Value of the uniform.


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