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 **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGCAMERABASE_H_
55 #define _OSGCAMERABASE_H_
61 #include "OSGConfig.h"
62 #include "OSGSystemDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGAttachmentContainer.h" // Parent
68 #include "OSGNodeFields.h" // Beacon type
69 #include "OSGSysFields.h" // Near type
71 #include "OSGCameraFields.h"
78 //! \brief Camera Base Class.
80 class OSG_SYSTEM_DLLMAPPING CameraBase
: public AttachmentContainer
84 typedef AttachmentContainer Inherited
;
85 typedef AttachmentContainer ParentContainer
;
87 typedef Inherited::TypeObject TypeObject
;
88 typedef TypeObject::InitPhase InitPhase
;
90 OSG_GEN_INTERNALPTR(Camera
);
92 /*========================== PUBLIC =================================*/
98 BeaconFieldId
= Inherited::NextFieldId
,
99 NearFieldId
= BeaconFieldId
+ 1,
100 FarFieldId
= NearFieldId
+ 1,
101 NextFieldId
= FarFieldId
+ 1
104 static const OSG::BitVector BeaconFieldMask
=
105 (TypeTraits
<BitVector
>::One
<< BeaconFieldId
);
106 static const OSG::BitVector NearFieldMask
=
107 (TypeTraits
<BitVector
>::One
<< NearFieldId
);
108 static const OSG::BitVector FarFieldMask
=
109 (TypeTraits
<BitVector
>::One
<< FarFieldId
);
110 static const OSG::BitVector NextFieldMask
=
111 (TypeTraits
<BitVector
>::One
<< NextFieldId
);
113 typedef SFWeakNodePtr SFBeaconType
;
114 typedef SFReal32 SFNearType
;
115 typedef SFReal32 SFFarType
;
117 /*---------------------------------------------------------------------*/
118 /*! \name Class Get */
121 static FieldContainerType
&getClassType (void);
122 static UInt32
getClassTypeId (void);
123 static UInt16
getClassGroupId(void);
126 /*---------------------------------------------------------------------*/
127 /*! \name FieldContainer Get */
130 virtual FieldContainerType
&getType (void);
131 virtual const FieldContainerType
&getType (void) const;
133 virtual UInt32
getContainerSize(void) const;
136 /*---------------------------------------------------------------------*/
137 /*! \name Field Get */
140 virtual const SFWeakNodePtr
*getSFBeacon (void) const;
141 virtual SFWeakNodePtr
*editSFBeacon (void);
143 virtual SFReal32
*editSFNear (void);
144 virtual const SFReal32
*getSFNear (void) const;
146 virtual SFReal32
*editSFFar (void);
147 virtual const SFReal32
*getSFFar (void) const;
150 virtual Node
* getBeacon (void) const;
152 virtual Real32
&editNear (void);
153 virtual Real32
getNear (void) const;
155 virtual Real32
&editFar (void);
156 virtual Real32
getFar (void) const;
159 /*---------------------------------------------------------------------*/
160 /*! \name Field Set */
163 virtual void setBeacon (Node
* const value
);
164 virtual void setNear (const Real32 value
);
165 virtual void setFar (const Real32 value
);
168 /*---------------------------------------------------------------------*/
169 /*! \name Ptr Field Set */
173 /*---------------------------------------------------------------------*/
174 /*! \name Ptr MField Set */
178 /*---------------------------------------------------------------------*/
179 /*! \name Binary Access */
182 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
183 virtual void copyToBin (BinaryDataHandler
&pMem
,
184 ConstFieldMaskArg whichField
);
185 virtual void copyFromBin(BinaryDataHandler
&pMem
,
186 ConstFieldMaskArg whichField
);
190 /*========================= PROTECTED ===============================*/
194 static TypeObject _type
;
196 static void classDescInserter(TypeObject
&oType
);
197 static const Char8
*getClassname (void );
199 /*---------------------------------------------------------------------*/
203 SFWeakNodePtr _sfBeacon
;
208 /*---------------------------------------------------------------------*/
209 /*! \name Constructors */
213 CameraBase(const CameraBase
&source
);
216 /*---------------------------------------------------------------------*/
217 /*! \name Destructors */
220 virtual ~CameraBase(void);
223 /*---------------------------------------------------------------------*/
224 /*! \name onCreate */
227 void onCreate(const Camera
*source
= NULL
);
230 /*---------------------------------------------------------------------*/
231 /*! \name Generic Field Access */
234 virtual GetFieldHandlePtr
getHandleBeacon (void) const;
235 virtual EditFieldHandlePtr
editHandleBeacon (void);
236 virtual GetFieldHandlePtr
getHandleNear (void) const;
237 virtual EditFieldHandlePtr
editHandleNear (void);
238 virtual GetFieldHandlePtr
getHandleFar (void) const;
239 virtual EditFieldHandlePtr
editHandleFar (void);
242 /*---------------------------------------------------------------------*/
246 #ifdef OSG_MT_CPTR_ASPECT
247 virtual void execSyncV( FieldContainer
&oFrom
,
248 ConstFieldMaskArg whichField
,
249 AspectOffsetStore
&oOffsets
,
250 ConstFieldMaskArg syncMode
,
251 const UInt32 uiSyncInfo
);
253 void execSync ( CameraBase
*pFrom
,
254 ConstFieldMaskArg whichField
,
255 AspectOffsetStore
&oOffsets
,
256 ConstFieldMaskArg syncMode
,
257 const UInt32 uiSyncInfo
);
261 /*---------------------------------------------------------------------*/
266 /*---------------------------------------------------------------------*/
267 /*! \name Aspect Create */
271 /*---------------------------------------------------------------------*/
275 /*---------------------------------------------------------------------*/
279 virtual void resolveLinks(void);
282 /*========================== PRIVATE ================================*/
285 /*---------------------------------------------------------------------*/
287 // prohibit default functions (move to 'public' if you need one)
288 void operator =(const CameraBase
&source
);
291 typedef CameraBase
*CameraBaseP
;
295 #endif /* _OSGCAMERABASE_H_ */