Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

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

#include <OSGBaseTypeTraits.h>

Inheritance diagram for 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::TypeTraits< Real32 >

Definition at line 825 of file OSGBaseTypeTraits.h.


Member Typedef Documentation

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

Definition at line 827 of file OSGBaseTypeTraits.h.


Member Function Documentation

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

Definition at line 833 of file OSGBaseTypeTraits.h.

00834     {
00835         return 0.f;
00836     }

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

Definition at line 838 of file OSGBaseTypeTraits.h.

00839     {
00840         return 1.f;
00841     }

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

Definition at line 843 of file OSGBaseTypeTraits.h.

00844     {
00845         return FLT_MAX;
00846     }

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

Definition at line 848 of file OSGBaseTypeTraits.h.

00849     {
00850         return FLT_MIN;
00851     }

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

Definition at line 854 of file OSGBaseTypeTraits.h.

00854 { return rVal; };

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

Definition at line 855 of file OSGBaseTypeTraits.h.

00855 { return rVal; };

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

Definition at line 858 of file OSGBaseTypeTraits.h.

00859     {
00860         if(szString != NULL)
00861         {
00862 #if defined(__sgi) || defined(WIN32)
00863             return Real32(atof  (szString));
00864 #else
00865             return Real32(strtof(szString, NULL));
00866 #endif
00867         }
00868         else
00869         {
00870             return getZeroElement();
00871         }
00872     }

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

Definition at line 874 of file OSGBaseTypeTraits.h.

00875     {
00876         Char8 buffer[20];
00877 
00878         sprintf(buffer, "%e", val);
00879 
00880         return std::string(buffer);
00881     }


Member Data Documentation

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

Definition at line 830 of file OSGBaseTypeTraits.h.

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

Definition at line 831 of file OSGBaseTypeTraits.h.


The documentation for this struct was generated from the following file:
Generated on Thu Aug 25 04:12:32 2005 for OpenSG by  doxygen 1.4.3