changed: gcc8 base update
[opensg.git] / Source / Contrib / ComplexSceneManager / OSGCSMPerspectiveCameraBase.h
blobcff405c8a94043b147e76dabbe6445c5e7da4e0c
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2013 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net *
10 * *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
13 * License *
14 * *
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. *
18 * *
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. *
23 * *
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. *
27 * *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
30 * Changes *
31 * *
32 * *
33 * *
34 * *
35 * *
36 * *
37 \*---------------------------------------------------------------------------*/
39 /*****************************************************************************\
40 *****************************************************************************
41 ** **
42 ** This file is automatically generated. **
43 ** **
44 ** Any changes made to this file WILL be lost when it is **
45 ** regenerated, which can become necessary at any time. **
46 ** **
47 ** Do not change this file, changes should be done in the derived **
48 ** class CSMPerspectiveCamera
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGCSMPERSPECTIVECAMERABASE_H_
55 #define _OSGCSMPERSPECTIVECAMERABASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
61 #include "OSGConfig.h"
62 #include "OSGContribCSMDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGPerspectiveCamera.h" // Parent
68 #include "OSGSysFields.h" // EyeSeparation type
69 #include "OSGNodeFields.h" // HeadBeacon type
71 #include "OSGCSMPerspectiveCameraFields.h"
73 OSG_BEGIN_NAMESPACE
76 class CSMPerspectiveCamera;
78 //! \brief CSMPerspectiveCamera Base Class.
80 class OSG_CONTRIBCSM_DLLMAPPING CSMPerspectiveCameraBase : public PerspectiveCamera
82 public:
84 typedef PerspectiveCamera Inherited;
85 typedef PerspectiveCamera ParentContainer;
87 typedef Inherited::TypeObject TypeObject;
88 typedef TypeObject::InitPhase InitPhase;
90 OSG_GEN_INTERNALPTR(CSMPerspectiveCamera);
92 /*========================== PUBLIC =================================*/
94 public:
96 enum
98 EyeSeparationFieldId = Inherited::NextFieldId,
99 ZeroParallaxFieldId = EyeSeparationFieldId + 1,
100 HeadBeaconFieldId = ZeroParallaxFieldId + 1,
101 NextFieldId = HeadBeaconFieldId + 1
104 static const OSG::BitVector EyeSeparationFieldMask =
105 (TypeTraits<BitVector>::One << EyeSeparationFieldId);
106 static const OSG::BitVector ZeroParallaxFieldMask =
107 (TypeTraits<BitVector>::One << ZeroParallaxFieldId);
108 static const OSG::BitVector HeadBeaconFieldMask =
109 (TypeTraits<BitVector>::One << HeadBeaconFieldId);
110 static const OSG::BitVector NextFieldMask =
111 (TypeTraits<BitVector>::One << NextFieldId);
113 typedef SFReal32 SFEyeSeparationType;
114 typedef SFReal32 SFZeroParallaxType;
115 typedef SFWeakNodePtr SFHeadBeaconType;
117 /*---------------------------------------------------------------------*/
118 /*! \name Class Get */
119 /*! \{ */
121 static FieldContainerType &getClassType (void);
122 static UInt32 getClassTypeId (void);
123 static UInt16 getClassGroupId(void);
125 /*! \} */
126 /*---------------------------------------------------------------------*/
127 /*! \name FieldContainer Get */
128 /*! \{ */
130 virtual FieldContainerType &getType (void);
131 virtual const FieldContainerType &getType (void) const;
133 virtual UInt32 getContainerSize(void) const;
135 /*! \} */
136 /*---------------------------------------------------------------------*/
137 /*! \name Field Get */
138 /*! \{ */
141 SFReal32 *editSFEyeSeparation (void);
142 const SFReal32 *getSFEyeSeparation (void) const;
144 SFReal32 *editSFZeroParallax (void);
145 const SFReal32 *getSFZeroParallax (void) const;
146 const SFWeakNodePtr *getSFHeadBeacon (void) const;
147 SFWeakNodePtr *editSFHeadBeacon (void);
150 Real32 &editEyeSeparation (void);
151 Real32 getEyeSeparation (void) const;
153 Real32 &editZeroParallax (void);
154 Real32 getZeroParallax (void) const;
156 Node * getHeadBeacon (void) const;
158 /*! \} */
159 /*---------------------------------------------------------------------*/
160 /*! \name Field Set */
161 /*! \{ */
163 void setEyeSeparation (const Real32 value);
164 void setZeroParallax (const Real32 value);
165 void setHeadBeacon (Node * const value);
167 /*! \} */
168 /*---------------------------------------------------------------------*/
169 /*! \name Ptr Field Set */
170 /*! \{ */
172 /*! \} */
173 /*---------------------------------------------------------------------*/
174 /*! \name Ptr MField Set */
175 /*! \{ */
177 /*! \} */
178 /*---------------------------------------------------------------------*/
179 /*! \name Binary Access */
180 /*! \{ */
182 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
183 virtual void copyToBin (BinaryDataHandler &pMem,
184 ConstFieldMaskArg whichField);
185 virtual void copyFromBin(BinaryDataHandler &pMem,
186 ConstFieldMaskArg whichField);
189 /*! \} */
190 /*---------------------------------------------------------------------*/
191 /*! \name Construction */
192 /*! \{ */
194 static CSMPerspectiveCameraTransitPtr create (void);
195 static CSMPerspectiveCamera *createEmpty (void);
197 static CSMPerspectiveCameraTransitPtr createLocal (
198 BitVector bFlags = FCLocal::All);
200 static CSMPerspectiveCamera *createEmptyLocal(
201 BitVector bFlags = FCLocal::All);
203 static CSMPerspectiveCameraTransitPtr createDependent (BitVector bFlags);
205 /*! \} */
206 /*---------------------------------------------------------------------*/
207 /*! \name Copy */
208 /*! \{ */
210 virtual FieldContainerTransitPtr shallowCopy (void) const;
211 virtual FieldContainerTransitPtr shallowCopyLocal(
212 BitVector bFlags = FCLocal::All) const;
213 virtual FieldContainerTransitPtr shallowCopyDependent(
214 BitVector bFlags) const;
216 /*! \} */
217 /*========================= PROTECTED ===============================*/
219 protected:
221 static TypeObject _type;
223 static void classDescInserter(TypeObject &oType);
224 static const Char8 *getClassname (void );
226 /*---------------------------------------------------------------------*/
227 /*! \name Fields */
228 /*! \{ */
230 SFReal32 _sfEyeSeparation;
231 SFReal32 _sfZeroParallax;
232 SFWeakNodePtr _sfHeadBeacon;
234 /*! \} */
235 /*---------------------------------------------------------------------*/
236 /*! \name Constructors */
237 /*! \{ */
239 CSMPerspectiveCameraBase(void);
240 CSMPerspectiveCameraBase(const CSMPerspectiveCameraBase &source);
242 /*! \} */
243 /*---------------------------------------------------------------------*/
244 /*! \name Destructors */
245 /*! \{ */
247 virtual ~CSMPerspectiveCameraBase(void);
249 /*! \} */
250 /*---------------------------------------------------------------------*/
251 /*! \name onCreate */
252 /*! \{ */
254 void onCreate(const CSMPerspectiveCamera *source = NULL);
256 /*! \} */
257 /*---------------------------------------------------------------------*/
258 /*! \name Generic Field Access */
259 /*! \{ */
261 GetFieldHandlePtr getHandleEyeSeparation (void) const;
262 EditFieldHandlePtr editHandleEyeSeparation (void);
263 GetFieldHandlePtr getHandleZeroParallax (void) const;
264 EditFieldHandlePtr editHandleZeroParallax (void);
265 GetFieldHandlePtr getHandleHeadBeacon (void) const;
266 EditFieldHandlePtr editHandleHeadBeacon (void);
268 /*! \} */
269 /*---------------------------------------------------------------------*/
270 /*! \name Sync */
271 /*! \{ */
273 #ifdef OSG_MT_CPTR_ASPECT
274 virtual void execSyncV( FieldContainer &oFrom,
275 ConstFieldMaskArg whichField,
276 AspectOffsetStore &oOffsets,
277 ConstFieldMaskArg syncMode ,
278 const UInt32 uiSyncInfo);
280 void execSync ( CSMPerspectiveCameraBase *pFrom,
281 ConstFieldMaskArg whichField,
282 AspectOffsetStore &oOffsets,
283 ConstFieldMaskArg syncMode ,
284 const UInt32 uiSyncInfo);
285 #endif
287 /*! \} */
288 /*---------------------------------------------------------------------*/
289 /*! \name Edit */
290 /*! \{ */
292 /*! \} */
293 /*---------------------------------------------------------------------*/
294 /*! \name Aspect Create */
295 /*! \{ */
297 #ifdef OSG_MT_CPTR_ASPECT
298 virtual FieldContainer *createAspectCopy(
299 const FieldContainer *pRefAspect) const;
300 #endif
302 /*! \} */
303 /*---------------------------------------------------------------------*/
304 /*! \name Edit */
305 /*! \{ */
306 /*! \} */
307 /*---------------------------------------------------------------------*/
308 /*! \name Sync */
309 /*! \{ */
311 virtual void resolveLinks(void);
313 /*! \} */
314 /*========================== PRIVATE ================================*/
316 private:
317 /*---------------------------------------------------------------------*/
319 // prohibit default functions (move to 'public' if you need one)
320 void operator =(const CSMPerspectiveCameraBase &source);
323 typedef CSMPerspectiveCameraBase *CSMPerspectiveCameraBaseP;
325 OSG_END_NAMESPACE
327 #endif /* _OSGCSMPERSPECTIVECAMERABASE_H_ */