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

#include <OSGBaseTypeTraits.h>

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

osg::TypeTraitsBase

List of all members.

Public Types

typedef Real32 RealReturnType

Static Public Member Functions

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

Static Public Attributes

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


Detailed Description

template<>
struct osg::osg::TypeTraits< Real32 >

Definition at line 847 of file OSGBaseTypeTraits.h.


Member Typedef Documentation

typedef Real32 osg::osg::TypeTraits< Real32 >::RealReturnType

Definition at line 849 of file OSGBaseTypeTraits.h.


Member Function Documentation

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

Definition at line 855 of file OSGBaseTypeTraits.h.

00856     {
00857         return 0.f;
00858     }

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

Definition at line 860 of file OSGBaseTypeTraits.h.

00861     {
00862         return 1.f;
00863     }

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

Definition at line 865 of file OSGBaseTypeTraits.h.

00866     {
00867         return FLT_MAX;
00868     }

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

Definition at line 870 of file OSGBaseTypeTraits.h.

00871     {
00872         return FLT_MIN;
00873     }

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

Definition at line 876 of file OSGBaseTypeTraits.h.

00876 { return rVal; };

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

Definition at line 877 of file OSGBaseTypeTraits.h.

00877 { return rVal; };

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

Definition at line 880 of file OSGBaseTypeTraits.h.

00881     {
00882         if(szString != NULL)
00883         {
00884 #if defined(__sgi) || defined(WIN32) || defined(__sun)
00885             return Real32(atof  (szString));
00886 #else
00887             return Real32(strtof(szString, NULL));
00888 #endif
00889         }
00890         else
00891         {
00892             return getZeroElement();
00893         }
00894     }

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

Definition at line 896 of file OSGBaseTypeTraits.h.

00897     {
00898         Char8 buffer[20];
00899 
00900         sprintf(buffer, "%e", val);
00901 
00902         return std::string(buffer);
00903     }


Member Data Documentation

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

Definition at line 852 of file OSGBaseTypeTraits.h.

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

Definition at line 853 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