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

#include <OSGBaseTypeTraits.h>

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

osg::TypeTraitsBase

List of all members.

Public Types

typedef Real64 RealReturnType

Static Public Member Functions

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

Static Public Attributes

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


Detailed Description

template<>
struct osg::osg::TypeTraits< Real64 >

Definition at line 912 of file OSGBaseTypeTraits.h.


Member Typedef Documentation

typedef Real64 osg::osg::TypeTraits< Real64 >::RealReturnType

Definition at line 914 of file OSGBaseTypeTraits.h.


Member Function Documentation

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

Definition at line 920 of file OSGBaseTypeTraits.h.

00921     {
00922         return 0.0;
00923     }

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

Definition at line 925 of file OSGBaseTypeTraits.h.

00926     {
00927         return 1.0;
00928     }

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

Definition at line 930 of file OSGBaseTypeTraits.h.

00931     {
00932         return DBL_MAX;
00933     }

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

Definition at line 935 of file OSGBaseTypeTraits.h.

00936     {
00937         return DBL_MIN;
00938     }

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

Definition at line 941 of file OSGBaseTypeTraits.h.

00941 { return rVal; };

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

Definition at line 942 of file OSGBaseTypeTraits.h.

00942 { return rVal; };

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

Definition at line 945 of file OSGBaseTypeTraits.h.

00946     {
00947         if(szString != NULL)
00948         {
00949             return Real64(strtod(szString, NULL));
00950         }
00951         else
00952         {
00953             return getZeroElement();
00954         }
00955     }

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

Definition at line 957 of file OSGBaseTypeTraits.h.

00958     {
00959         Char8 buffer[25];
00960 
00961         sprintf(buffer, "%e", val);
00962 
00963         return std::string(buffer);
00964     }


Member Data Documentation

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

Definition at line 917 of file OSGBaseTypeTraits.h.

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

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