OpenWalnut  1.4.0
Functions
WDataTexture3DScalers Namespace Reference

Namespace provides some scaling functions for scaling data values to meet the OpenGL requirements. More...

Functions

template<typename T >
wge::GLType< T >::Type scaleInterval (T value, T minimum, T maximum, double scaler)
 Scales the specified value to the interval [0,1] using m_min and m_scale.
int8_t scaleInterval (int8_t value, int8_t, int8_t, double)
 Byte data is transferred to texture mem as is without any scaling.
uint8_t scaleInterval (uint8_t value, uint8_t, uint8_t, double)
 Byte data is transferred to texture mem as is without any scaling.

Detailed Description

Namespace provides some scaling functions for scaling data values to meet the OpenGL requirements.


Function Documentation

template<typename T >
wge::GLType< T >::Type WDataTexture3DScalers::scaleInterval ( value,
minimum,
maximum,
double  scaler 
) [inline]

Scales the specified value to the interval [0,1] using m_min and m_scale.

As the method is inline, the additional parameters are no problem.

Parameters:
valuethe value to scale
minimumthe min value
maximumthe max value
scalerthe scaler
Returns:
the value scaled to [0,1]
Notes:
Most integral types need to be scaled. See WGETypeTraits.h for details.

Definition at line 62 of file WDataTexture3D.h.

Referenced by WDataTexture3D::createTexture().

int8_t WDataTexture3DScalers::scaleInterval ( int8_t  value,
int8_t  ,
int8_t  ,
double   
) [inline]

Byte data is transferred to texture mem as is without any scaling.

Parameters:
valuethe value to scale
Returns:
the value

Definition at line 74 of file WDataTexture3D.h.

uint8_t WDataTexture3DScalers::scaleInterval ( uint8_t  value,
uint8_t  ,
uint8_t  ,
double   
) [inline]

Byte data is transferred to texture mem as is without any scaling.

Parameters:
valuethe value to scale
Returns:
the value

Definition at line 86 of file WDataTexture3D.h.