fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / Window / Base / OSGCameraBase.h
blob4b229379f6aaf948d2dbe0fd7aad2f5988e087e9
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 Camera
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGCAMERABASE_H_
55 #define _OSGCAMERABASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
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"
73 OSG_BEGIN_NAMESPACE
76 class Camera;
78 //! \brief Camera Base Class.
80 class OSG_SYSTEM_DLLMAPPING CameraBase : public AttachmentContainer
82 public:
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 =================================*/
94 public:
96 enum
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 */
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 /*! \{ */
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;
158 /*! \} */
159 /*---------------------------------------------------------------------*/
160 /*! \name Field Set */
161 /*! \{ */
163 virtual void setBeacon (Node * const value);
164 virtual void setNear (const Real32 value);
165 virtual void setFar (const Real32 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 /*========================= PROTECTED ===============================*/
192 protected:
194 static TypeObject _type;
196 static void classDescInserter(TypeObject &oType);
197 static const Char8 *getClassname (void );
199 /*---------------------------------------------------------------------*/
200 /*! \name Fields */
201 /*! \{ */
203 SFWeakNodePtr _sfBeacon;
204 SFReal32 _sfNear;
205 SFReal32 _sfFar;
207 /*! \} */
208 /*---------------------------------------------------------------------*/
209 /*! \name Constructors */
210 /*! \{ */
212 CameraBase(void);
213 CameraBase(const CameraBase &source);
215 /*! \} */
216 /*---------------------------------------------------------------------*/
217 /*! \name Destructors */
218 /*! \{ */
220 virtual ~CameraBase(void);
222 /*! \} */
223 /*---------------------------------------------------------------------*/
224 /*! \name onCreate */
225 /*! \{ */
227 void onCreate(const Camera *source = NULL);
229 /*! \} */
230 /*---------------------------------------------------------------------*/
231 /*! \name Generic Field Access */
232 /*! \{ */
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);
241 /*! \} */
242 /*---------------------------------------------------------------------*/
243 /*! \name Sync */
244 /*! \{ */
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);
258 #endif
260 /*! \} */
261 /*---------------------------------------------------------------------*/
262 /*! \name Edit */
263 /*! \{ */
265 /*! \} */
266 /*---------------------------------------------------------------------*/
267 /*! \name Aspect Create */
268 /*! \{ */
270 /*! \} */
271 /*---------------------------------------------------------------------*/
272 /*! \name Edit */
273 /*! \{ */
274 /*! \} */
275 /*---------------------------------------------------------------------*/
276 /*! \name Sync */
277 /*! \{ */
279 virtual void resolveLinks(void);
281 /*! \} */
282 /*========================== PRIVATE ================================*/
284 private:
285 /*---------------------------------------------------------------------*/
287 // prohibit default functions (move to 'public' if you need one)
288 void operator =(const CameraBase &source);
291 typedef CameraBase *CameraBaseP;
293 OSG_END_NAMESPACE
295 #endif /* _OSGCAMERABASE_H_ */