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

osg::FieldDataTraits< Plane > Struct Template Reference
[Field Data Traits]

#include <OSGBaseFieldDataType.h>

Inheritance diagram for osg::FieldDataTraits< Plane >:

osg::FieldTraitsRecurseBase< Plane > osg::FieldTraits List of all members.

Public Types

enum  { StringConvertable }
typedef osgIF< uiTest==1,
const Plane, const Plane
& >::_IRet 
ArgumentType
enum  { ToStringConvertable = 0x01, FromStringConvertable = 0x02 }

Static Public Member Functions

static DataTypegetType (void)
static const Char8getSName (void)
static const Char8getMName (void)
static Plane getDefault (void)
static bool getFromString (Plane &, const Char8 *&)
static void putToString (const Plane &inVal, std::string &outStr)
static UInt32 getBinSize (const Plane &)
static UInt32 getBinSize (const Plane *, UInt32 uiNumObjects)
static void copyToBin (BinaryDataHandler &pMem, const Plane &oObject)
static void copyToBin (BinaryDataHandler &pMem, const Plane *pObjectStore, UInt32 uiNumObjects)
static void copyFromBin (BinaryDataHandler &pMem, Plane &oObject)
static void copyFromBin (BinaryDataHandler &pMem, Plane *pObjectStore, UInt32 uiNumObjects)
static bool getFromString (Plane &outVal, const Char8 *inVal)
static const Char8getPName (void)

Static Public Attributes

static DataType _type
static const UInt32 uiTest

Detailed Description

template<>
struct osg::FieldDataTraits< Plane >

Definition at line 1088 of file OSGBaseFieldDataType.h.


Member Typedef Documentation

typedef osgIF<uiTest == 1, const Plane , const Plane & >::_IRet osg::FieldTraitsRecurseBase< Plane >::ArgumentType [inherited]
 

Definition at line 122 of file OSGFieldDataType.h.


Member Enumeration Documentation

anonymous enum
 

Enumerator:
StringConvertable 

Definition at line 1093 of file OSGBaseFieldDataType.h.

anonymous enum [inherited]
 

Enumerator:
ToStringConvertable 
FromStringConvertable 

Definition at line 69 of file OSGFieldDataType.h.

00070     {
00071         ToStringConvertable   = 0x01,
00072         FromStringConvertable = 0x02
00073     };


Member Function Documentation

static DataType& osg::FieldDataTraits< Plane >::getType void   )  [inline, static]
 

Definition at line 1096 of file OSGBaseFieldDataType.h.

01096 { return _type;          }

static const Char8* osg::FieldDataTraits< Plane >::getSName void   )  [inline, static]
 

Definition at line 1098 of file OSGBaseFieldDataType.h.

01098 { return "SFPlane";      }

static const Char8* osg::FieldDataTraits< Plane >::getMName void   )  [inline, static]
 

Definition at line 1100 of file OSGBaseFieldDataType.h.

01100 { return "MFPlane";      }

static Plane osg::FieldDataTraits< Plane >::getDefault void   )  [inline, static]
 

Definition at line 1102 of file OSGBaseFieldDataType.h.

01102 { return Plane();        }

static bool osg::FieldDataTraits< Plane >::getFromString Plane ,
const Char8 *& 
[inline, static]
 

Definition at line 1104 of file OSGBaseFieldDataType.h.

01106     {
01107         // TO_BE_DONE
01108         return false;
01109     }

static void osg::FieldDataTraits< Plane >::putToString const Plane inVal,
std::string &  outStr
[inline, static]
 

Reimplemented from osg::FieldTraitsRecurseBase< Plane >.

Definition at line 1111 of file OSGBaseFieldDataType.h.

References osg::Plane::getDistanceFromOrigin(), osg::Plane::getNormal(), osg::PointInterface< ValueTypeT, StorageInterfaceT >::getValues(), and osg::FieldTraitsRecurseBase< FieldTypeT >::putToString().

01113     {
01114         typedef TypeTraits<Vec3f::ValueType> TypeTrait;
01115 
01116         Vec3f  normal = inVal.getNormal();
01117         Real32 dist   = inVal.getDistanceFromOrigin();
01118         
01119         outStr.assign(TypeTrait::putToString(normal.getValues()[0]));
01120         outStr.append(" ");
01121         outStr.append(TypeTrait::putToString(normal.getValues()[1]));
01122         outStr.append(" ");
01123         outStr.append(TypeTrait::putToString(normal.getValues()[2]));
01124         outStr.append(", ");
01125         outStr.append(TypeTraits<Real32>::putToString(dist));
01126     }

static UInt32 osg::FieldDataTraits< Plane >::getBinSize const Plane  )  [inline, static]
 

Reimplemented from osg::FieldTraitsRecurseBase< Plane >.

Definition at line 1128 of file OSGBaseFieldDataType.h.

01129     {
01130         return sizeof(UInt32) * 4;
01131     }

static UInt32 osg::FieldDataTraits< Plane >::getBinSize const Plane ,
UInt32  uiNumObjects
[inline, static]
 

Reimplemented from osg::FieldTraitsRecurseBase< Plane >.

Definition at line 1133 of file OSGBaseFieldDataType.h.

01135     {
01136         return sizeof(UInt32) * 4 * uiNumObjects;
01137     }

static void osg::FieldDataTraits< Plane >::copyToBin BinaryDataHandler pMem,
const Plane oObject
[inline, static]
 

Reimplemented from osg::FieldTraitsRecurseBase< Plane >.

Definition at line 1139 of file OSGBaseFieldDataType.h.

References osg::Plane::getDistanceFromOrigin(), osg::Plane::getNormal(), osg::BinaryDataHandler::putValue(), and osg::BinaryDataHandler::putValues().

01141     {
01142         const Vec3f &normal   = oObject.getNormal            ();
01143         Real32       distance = oObject.getDistanceFromOrigin();
01144 
01145         pMem.putValues(&normal[0], 3);
01146         pMem.putValue ( distance    );
01147     }

static void osg::FieldDataTraits< Plane >::copyToBin BinaryDataHandler pMem,
const Plane pObjectStore,
UInt32  uiNumObjects
[inline, static]
 

Reimplemented from osg::FieldTraitsRecurseBase< Plane >.

Definition at line 1149 of file OSGBaseFieldDataType.h.

References osg::FieldTraitsRecurseBase< FieldTypeT >::copyToBin().

01152     {
01153         for(UInt32 i = 0; i < uiNumObjects; ++i)
01154         {
01155             copyToBin(pMem, pObjectStore[i]);
01156         }
01157     }

static void osg::FieldDataTraits< Plane >::copyFromBin BinaryDataHandler pMem,
Plane oObject
[inline, static]
 

Reimplemented from osg::FieldTraitsRecurseBase< Plane >.

Definition at line 1159 of file OSGBaseFieldDataType.h.

References osg::BinaryDataHandler::getValue(), osg::BinaryDataHandler::getValues(), and osg::Plane::set().

01161     {
01162         Vec3f  normal;
01163         Real32 distance;
01164 
01165         pMem.getValues(&normal[0], 3);
01166         pMem.getValue ( distance    );
01167 
01168         oObject.set(normal, distance);
01169     }

static void osg::FieldDataTraits< Plane >::copyFromBin BinaryDataHandler pMem,
Plane pObjectStore,
UInt32  uiNumObjects
[inline, static]
 

Reimplemented from osg::FieldTraitsRecurseBase< Plane >.

Definition at line 1171 of file OSGBaseFieldDataType.h.

References osg::FieldTraitsRecurseBase< FieldTypeT >::copyFromBin().

01174     {
01175         for(UInt32 i = 0; i < uiNumObjects; ++i)
01176         {
01177             copyFromBin(pMem, pObjectStore[i]);
01178         }
01179     }

static bool osg::FieldTraitsRecurseBase< Plane >::getFromString Plane outVal,
const Char8 inVal
[inline, static, inherited]
 

Definition at line 209 of file OSGFieldDataType.h.

00211     {
00212         typedef FieldDataTraits<FieldTypeT> MappedTrait;
00213 
00214         return MappedTrait::getFromString(outVal, inVal);
00215     }

static const Char8* osg::FieldTraits::getPName void   )  [inline, static, inherited]
 

Definition at line 75 of file OSGFieldDataType.h.

00075 { return "Field"; }


Member Data Documentation

DataType osg::FieldDataTraits< Plane >::_type [static]
 

const UInt32 osg::FieldTraitsRecurseBase< Plane >::uiTest [static, inherited]
 

Definition at line 117 of file OSGFieldDataType.h.


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