1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2013 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
37 \*---------------------------------------------------------------------------*/
39 /*****************************************************************************\
40 *****************************************************************************
42 ** This file is automatically generated. **
44 ** Any changes made to this file WILL be lost when it is **
45 ** regenerated, which can become necessary at any time. **
47 ** Do not change this file, changes should be done in the derived **
48 ** class StereoCameraDecorator
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGSTEREOCAMERADECORATORBASE_H_
55 #define _OSGSTEREOCAMERADECORATORBASE_H_
61 #include "OSGConfig.h"
62 #include "OSGSystemDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGCameraDecorator.h" // Parent
68 #include "OSGSysFields.h" // LeftEye type
70 #include "OSGStereoCameraDecoratorFields.h"
75 class StereoCameraDecorator
;
77 //! \brief StereoCameraDecorator Base Class.
79 class OSG_SYSTEM_DLLMAPPING StereoCameraDecoratorBase
: public CameraDecorator
83 typedef CameraDecorator Inherited
;
84 typedef CameraDecorator ParentContainer
;
86 typedef Inherited::TypeObject TypeObject
;
87 typedef TypeObject::InitPhase InitPhase
;
89 OSG_GEN_INTERNALPTR(StereoCameraDecorator
);
91 /*========================== PUBLIC =================================*/
97 LeftEyeFieldId
= Inherited::NextFieldId
,
98 EyeSeparationFieldId
= LeftEyeFieldId
+ 1,
99 NextFieldId
= EyeSeparationFieldId
+ 1
102 static const OSG::BitVector LeftEyeFieldMask
=
103 (TypeTraits
<BitVector
>::One
<< LeftEyeFieldId
);
104 static const OSG::BitVector EyeSeparationFieldMask
=
105 (TypeTraits
<BitVector
>::One
<< EyeSeparationFieldId
);
106 static const OSG::BitVector NextFieldMask
=
107 (TypeTraits
<BitVector
>::One
<< NextFieldId
);
109 typedef SFBool SFLeftEyeType
;
110 typedef SFReal32 SFEyeSeparationType
;
112 /*---------------------------------------------------------------------*/
113 /*! \name Class Get */
116 static FieldContainerType
&getClassType (void);
117 static UInt32
getClassTypeId (void);
118 static UInt16
getClassGroupId(void);
121 /*---------------------------------------------------------------------*/
122 /*! \name FieldContainer Get */
125 virtual FieldContainerType
&getType (void);
126 virtual const FieldContainerType
&getType (void) const;
128 virtual UInt32
getContainerSize(void) const;
131 /*---------------------------------------------------------------------*/
132 /*! \name Field Get */
136 SFBool
*editSFLeftEye (void);
137 const SFBool
*getSFLeftEye (void) const;
139 SFReal32
*editSFEyeSeparation (void);
140 const SFReal32
*getSFEyeSeparation (void) const;
143 bool &editLeftEye (void);
144 bool getLeftEye (void) const;
146 Real32
&editEyeSeparation (void);
147 Real32
getEyeSeparation (void) const;
150 /*---------------------------------------------------------------------*/
151 /*! \name Field Set */
154 void setLeftEye (const bool value
);
155 void setEyeSeparation (const Real32 value
);
158 /*---------------------------------------------------------------------*/
159 /*! \name Ptr MField Set */
163 /*---------------------------------------------------------------------*/
164 /*! \name Binary Access */
167 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
168 virtual void copyToBin (BinaryDataHandler
&pMem
,
169 ConstFieldMaskArg whichField
);
170 virtual void copyFromBin(BinaryDataHandler
&pMem
,
171 ConstFieldMaskArg whichField
);
175 /*========================= PROTECTED ===============================*/
179 static TypeObject _type
;
181 static void classDescInserter(TypeObject
&oType
);
182 static const Char8
*getClassname (void );
184 /*---------------------------------------------------------------------*/
189 SFReal32 _sfEyeSeparation
;
192 /*---------------------------------------------------------------------*/
193 /*! \name Constructors */
196 StereoCameraDecoratorBase(void);
197 StereoCameraDecoratorBase(const StereoCameraDecoratorBase
&source
);
200 /*---------------------------------------------------------------------*/
201 /*! \name Destructors */
204 virtual ~StereoCameraDecoratorBase(void);
207 /*---------------------------------------------------------------------*/
208 /*! \name onCreate */
213 /*---------------------------------------------------------------------*/
214 /*! \name Generic Field Access */
217 GetFieldHandlePtr
getHandleLeftEye (void) const;
218 EditFieldHandlePtr
editHandleLeftEye (void);
219 GetFieldHandlePtr
getHandleEyeSeparation (void) const;
220 EditFieldHandlePtr
editHandleEyeSeparation (void);
223 /*---------------------------------------------------------------------*/
227 #ifdef OSG_MT_CPTR_ASPECT
228 virtual void execSyncV( FieldContainer
&oFrom
,
229 ConstFieldMaskArg whichField
,
230 AspectOffsetStore
&oOffsets
,
231 ConstFieldMaskArg syncMode
,
232 const UInt32 uiSyncInfo
);
234 void execSync ( StereoCameraDecoratorBase
*pFrom
,
235 ConstFieldMaskArg whichField
,
236 AspectOffsetStore
&oOffsets
,
237 ConstFieldMaskArg syncMode
,
238 const UInt32 uiSyncInfo
);
242 /*---------------------------------------------------------------------*/
247 /*---------------------------------------------------------------------*/
248 /*! \name Aspect Create */
252 /*---------------------------------------------------------------------*/
256 /*---------------------------------------------------------------------*/
260 virtual void resolveLinks(void);
263 /*========================== PRIVATE ================================*/
266 /*---------------------------------------------------------------------*/
268 // prohibit default functions (move to 'public' if you need one)
269 void operator =(const StereoCameraDecoratorBase
&source
);
272 typedef StereoCameraDecoratorBase
*StereoCameraDecoratorBaseP
;
276 #endif /* _OSGSTEREOCAMERADECORATORBASE_H_ */