osg::osg::TypeTraits< Real16 > Struct Template Reference
[BaseTypesTraits]

#include <OSGBaseTypeTraits.h>

Inheritance diagram for osg::osg::TypeTraits< Real16 >:

osg::TypeTraitsBase

List of all members.

Public Types

typedef Real16 RealReturnType

Static Public Member Functions

static Real16 getZeroElement (void)
static Real16 getOneElement (void)
static Real16 getMax (void)
static Real16 getMin (void)
static Real16 getFraction (Real16 rVal)
static Real16 getPortion (Real16 rVal)
static Real16 getFromString (const Char8 *szString)
static std::string putToString (const Real16 val)

Static Public Attributes

static const bool IsPOD = true
static const MathTypeProperties MathProp = RealValue


Detailed Description

template<>
struct osg::osg::TypeTraits< Real16 >

Definition at line 782 of file OSGBaseTypeTraits.h.


Member Typedef Documentation

typedef Real16 osg::osg::TypeTraits< Real16 >::RealReturnType

Definition at line 784 of file OSGBaseTypeTraits.h.


Member Function Documentation

static Real16 osg::osg::TypeTraits< Real16 >::getZeroElement ( void   )  [inline, static]

Definition at line 790 of file OSGBaseTypeTraits.h.

00791     {
00792         return Real16( 0.f );
00793     }

static Real16 osg::osg::TypeTraits< Real16 >::getOneElement ( void   )  [inline, static]

Definition at line 795 of file OSGBaseTypeTraits.h.

00796     {
00797         return Real16( 1.f );
00798     }

static Real16 osg::osg::TypeTraits< Real16 >::getMax ( void   )  [inline, static]

Definition at line 800 of file OSGBaseTypeTraits.h.

References REAL16_MAX.

00801     {
00802         return REAL16_MAX;
00803     }

static Real16 osg::osg::TypeTraits< Real16 >::getMin ( void   )  [inline, static]

Definition at line 805 of file OSGBaseTypeTraits.h.

References REAL16_MIN.

00806     {
00807         return REAL16_MIN;
00808     }

static Real16 osg::osg::TypeTraits< Real16 >::getFraction ( Real16  rVal  )  [inline, static]

Definition at line 811 of file OSGBaseTypeTraits.h.

00811 { return rVal; };

static Real16 osg::osg::TypeTraits< Real16 >::getPortion ( Real16  rVal  )  [inline, static]

Definition at line 812 of file OSGBaseTypeTraits.h.

00812 { return rVal; };

static Real16 osg::osg::TypeTraits< Real16 >::getFromString ( const Char8 szString  )  [inline, static]

Definition at line 815 of file OSGBaseTypeTraits.h.

00816     {
00817         if(szString != NULL)
00818         {
00819 #if defined(__sgi) || defined(WIN32) || defined(__sun)
00820             return Real16(Real32(atof  (szString)));
00821 #else
00822             return Real16(Real32(strtof(szString, NULL)));
00823 #endif
00824         }
00825         else
00826         {
00827             return getZeroElement();
00828         }
00829     }

static std::string osg::osg::TypeTraits< Real16 >::putToString ( const Real16  val  )  [inline, static]

Definition at line 831 of file OSGBaseTypeTraits.h.

00832     {
00833         Char8 buffer[20];
00834 
00835         sprintf(buffer, "%e", (Real32) val);
00836 
00837         return std::string(buffer);
00838     }


Member Data Documentation

const bool osg::osg::TypeTraits< Real16 >::IsPOD = true [static]

Definition at line 787 of file OSGBaseTypeTraits.h.

const MathTypeProperties osg::osg::TypeTraits< Real16 >::MathProp = RealValue [static]

Definition at line 788 of file OSGBaseTypeTraits.h.


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

Generated on Mon Mar 17 12:03:11 2008 for OpenSG by  doxygen 1.5.5