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 CameraDecorator
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGCAMERADECORATORBASE_H_
55 #define _OSGCAMERADECORATORBASE_H_
61 #include "OSGConfig.h"
62 #include "OSGSystemDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGCamera.h" // Parent
68 #include "OSGCameraFields.h" // Decoratee type
70 #include "OSGCameraDecoratorFields.h"
75 class CameraDecorator
;
77 //! \brief CameraDecorator Base Class.
79 class OSG_SYSTEM_DLLMAPPING CameraDecoratorBase
: public Camera
83 typedef Camera Inherited
;
84 typedef Camera ParentContainer
;
86 typedef Inherited::TypeObject TypeObject
;
87 typedef TypeObject::InitPhase InitPhase
;
89 OSG_GEN_INTERNALPTR(CameraDecorator
);
91 /*========================== PUBLIC =================================*/
97 DecorateeFieldId
= Inherited::NextFieldId
,
98 NextFieldId
= DecorateeFieldId
+ 1
101 static const OSG::BitVector DecorateeFieldMask
=
102 (TypeTraits
<BitVector
>::One
<< DecorateeFieldId
);
104 /*---------------------------------------------------------------------*/
105 /*! \name Class Get */
108 static FieldContainerType
&getClassType (void);
109 static UInt32
getClassTypeId (void);
110 static UInt16
getClassGroupId(void);
113 /*---------------------------------------------------------------------*/
114 /*! \name FieldContainer Get */
117 virtual FieldContainerType
&getType (void);
118 virtual const FieldContainerType
&getType (void) const;
120 virtual UInt32
getContainerSize(void) const;
123 /*---------------------------------------------------------------------*/
124 /*! \name Field Get */
127 virtual const SFUnrecCameraPtr
*getSFDecoratee(void) const;
128 virtual const SFWeakNodePtr
*getSFBeacon (void) const;
129 virtual SFWeakNodePtr
*editSFBeacon (void);
131 virtual SFReal32
*editSFNear (void);
132 virtual const SFReal32
*getSFNear (void) const;
134 virtual SFReal32
*editSFFar (void);
135 virtual const SFReal32
*getSFFar (void) const;
137 virtual Camera
*getDecoratee(void) const;
139 virtual Node
* getBeacon (void) const;
141 virtual Real32
&editNear (void);
142 virtual Real32
getNear (void) const;
144 virtual Real32
&editFar (void);
145 virtual Real32
getFar (void) const;
148 /*---------------------------------------------------------------------*/
149 /*! \name Field Set */
152 virtual void setDecoratee (Camera
* const value
);
153 virtual void setBeacon (Node
* const value
);
154 virtual void setNear (const Real32 value
);
155 virtual void setFar (const Real32 value
);
158 /*---------------------------------------------------------------------*/
159 /*! \name Ptr Field Set */
163 /*---------------------------------------------------------------------*/
164 /*! \name Ptr MField Set */
168 /*---------------------------------------------------------------------*/
169 /*! \name Binary Access */
172 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
173 virtual void copyToBin (BinaryDataHandler
&pMem
,
174 ConstFieldMaskArg whichField
);
175 virtual void copyFromBin(BinaryDataHandler
&pMem
,
176 ConstFieldMaskArg whichField
);
180 /*========================= PROTECTED ===============================*/
184 static TypeObject _type
;
186 static void classDescInserter(TypeObject
&oType
);
187 static const Char8
*getClassname (void );
189 /*---------------------------------------------------------------------*/
193 SFUnrecCameraPtr _sfDecoratee
;
196 /*---------------------------------------------------------------------*/
197 /*! \name Constructors */
200 CameraDecoratorBase(void);
201 CameraDecoratorBase(const CameraDecoratorBase
&source
);
204 /*---------------------------------------------------------------------*/
205 /*! \name Destructors */
208 virtual ~CameraDecoratorBase(void);
211 /*---------------------------------------------------------------------*/
212 /*! \name onCreate */
215 void onCreate(const CameraDecorator
*source
= NULL
);
218 /*---------------------------------------------------------------------*/
219 /*! \name Generic Field Access */
222 GetFieldHandlePtr
getHandleDecoratee (void) const;
223 EditFieldHandlePtr
editHandleDecoratee(void);
225 virtual GetFieldHandlePtr
getHandleBeacon (void) const;
226 virtual EditFieldHandlePtr
editHandleBeacon (void);
227 virtual GetFieldHandlePtr
getHandleNear (void) const;
228 virtual EditFieldHandlePtr
editHandleNear (void);
229 virtual GetFieldHandlePtr
getHandleFar (void) const;
230 virtual EditFieldHandlePtr
editHandleFar (void);
233 /*---------------------------------------------------------------------*/
237 #ifdef OSG_MT_CPTR_ASPECT
238 virtual void execSyncV( FieldContainer
&oFrom
,
239 ConstFieldMaskArg whichField
,
240 AspectOffsetStore
&oOffsets
,
241 ConstFieldMaskArg syncMode
,
242 const UInt32 uiSyncInfo
);
244 void execSync ( CameraDecoratorBase
*pFrom
,
245 ConstFieldMaskArg whichField
,
246 AspectOffsetStore
&oOffsets
,
247 ConstFieldMaskArg syncMode
,
248 const UInt32 uiSyncInfo
);
252 /*---------------------------------------------------------------------*/
257 /*---------------------------------------------------------------------*/
258 /*! \name Aspect Create */
262 /*---------------------------------------------------------------------*/
266 /*---------------------------------------------------------------------*/
270 virtual void resolveLinks(void);
273 /*========================== PRIVATE ================================*/
276 /*---------------------------------------------------------------------*/
278 // prohibit default functions (move to 'public' if you need one)
279 void operator =(const CameraDecoratorBase
&source
);
282 typedef CameraDecoratorBase
*CameraDecoratorBaseP
;
286 #endif /* _OSGCAMERADECORATORBASE_H_ */