changed: gcc8 base update
[opensg.git] / Source / System / Window / Base / OSGMatrixCameraBase.h
blob4ccd4879a6f62a889a323acd4760fe7a8096b6af
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 MatrixCamera
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGMATRIXCAMERABASE_H_
55 #define _OSGMATRIXCAMERABASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
61 #include "OSGConfig.h"
62 #include "OSGSystemDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGCamera.h" // Parent
68 #include "OSGMathFields.h" // ProjectionMatrix type
69 #include "OSGSysFields.h" // UseBeacon type
71 #include "OSGMatrixCameraFields.h"
73 OSG_BEGIN_NAMESPACE
76 class MatrixCamera;
78 //! \brief MatrixCamera Base Class.
80 class OSG_SYSTEM_DLLMAPPING MatrixCameraBase : public Camera
82 public:
84 typedef Camera Inherited;
85 typedef Camera ParentContainer;
87 typedef Inherited::TypeObject TypeObject;
88 typedef TypeObject::InitPhase InitPhase;
90 OSG_GEN_INTERNALPTR(MatrixCamera);
92 /*========================== PUBLIC =================================*/
94 public:
96 enum
98 ProjectionMatrixFieldId = Inherited::NextFieldId,
99 ModelviewMatrixFieldId = ProjectionMatrixFieldId + 1,
100 UseBeaconFieldId = ModelviewMatrixFieldId + 1,
101 NextFieldId = UseBeaconFieldId + 1
104 static const OSG::BitVector ProjectionMatrixFieldMask =
105 (TypeTraits<BitVector>::One << ProjectionMatrixFieldId);
106 static const OSG::BitVector ModelviewMatrixFieldMask =
107 (TypeTraits<BitVector>::One << ModelviewMatrixFieldId);
108 static const OSG::BitVector UseBeaconFieldMask =
109 (TypeTraits<BitVector>::One << UseBeaconFieldId);
110 static const OSG::BitVector NextFieldMask =
111 (TypeTraits<BitVector>::One << NextFieldId);
113 typedef SFMatrix SFProjectionMatrixType;
114 typedef SFMatrix SFModelviewMatrixType;
115 typedef SFBool SFUseBeaconType;
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 SFMatrix *editSFProjectionMatrix(void);
142 const SFMatrix *getSFProjectionMatrix (void) const;
144 SFMatrix *editSFModelviewMatrix(void);
145 const SFMatrix *getSFModelviewMatrix (void) const;
147 SFBool *editSFUseBeacon (void);
148 const SFBool *getSFUseBeacon (void) const;
151 Matrix &editProjectionMatrix(void);
152 const Matrix &getProjectionMatrix (void) const;
154 Matrix &editModelviewMatrix(void);
155 const Matrix &getModelviewMatrix (void) const;
157 bool &editUseBeacon (void);
158 bool getUseBeacon (void) const;
160 /*! \} */
161 /*---------------------------------------------------------------------*/
162 /*! \name Field Set */
163 /*! \{ */
165 void setProjectionMatrix(const Matrix &value);
166 void setModelviewMatrix(const Matrix &value);
167 void setUseBeacon (const bool value);
169 /*! \} */
170 /*---------------------------------------------------------------------*/
171 /*! \name Ptr MField Set */
172 /*! \{ */
174 /*! \} */
175 /*---------------------------------------------------------------------*/
176 /*! \name Binary Access */
177 /*! \{ */
179 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
180 virtual void copyToBin (BinaryDataHandler &pMem,
181 ConstFieldMaskArg whichField);
182 virtual void copyFromBin(BinaryDataHandler &pMem,
183 ConstFieldMaskArg whichField);
186 /*! \} */
187 /*---------------------------------------------------------------------*/
188 /*! \name Construction */
189 /*! \{ */
191 static MatrixCameraTransitPtr create (void);
192 static MatrixCamera *createEmpty (void);
194 static MatrixCameraTransitPtr createLocal (
195 BitVector bFlags = FCLocal::All);
197 static MatrixCamera *createEmptyLocal(
198 BitVector bFlags = FCLocal::All);
200 static MatrixCameraTransitPtr createDependent (BitVector bFlags);
202 /*! \} */
203 /*---------------------------------------------------------------------*/
204 /*! \name Copy */
205 /*! \{ */
207 virtual FieldContainerTransitPtr shallowCopy (void) const;
208 virtual FieldContainerTransitPtr shallowCopyLocal(
209 BitVector bFlags = FCLocal::All) const;
210 virtual FieldContainerTransitPtr shallowCopyDependent(
211 BitVector bFlags) const;
213 /*! \} */
214 /*========================= PROTECTED ===============================*/
216 protected:
218 static TypeObject _type;
220 static void classDescInserter(TypeObject &oType);
221 static const Char8 *getClassname (void );
223 /*---------------------------------------------------------------------*/
224 /*! \name Fields */
225 /*! \{ */
227 SFMatrix _sfProjectionMatrix;
228 SFMatrix _sfModelviewMatrix;
229 SFBool _sfUseBeacon;
231 /*! \} */
232 /*---------------------------------------------------------------------*/
233 /*! \name Constructors */
234 /*! \{ */
236 MatrixCameraBase(void);
237 MatrixCameraBase(const MatrixCameraBase &source);
239 /*! \} */
240 /*---------------------------------------------------------------------*/
241 /*! \name Destructors */
242 /*! \{ */
244 virtual ~MatrixCameraBase(void);
246 /*! \} */
247 /*---------------------------------------------------------------------*/
248 /*! \name onCreate */
249 /*! \{ */
252 /*! \} */
253 /*---------------------------------------------------------------------*/
254 /*! \name Generic Field Access */
255 /*! \{ */
257 GetFieldHandlePtr getHandleProjectionMatrix (void) const;
258 EditFieldHandlePtr editHandleProjectionMatrix(void);
259 GetFieldHandlePtr getHandleModelviewMatrix (void) const;
260 EditFieldHandlePtr editHandleModelviewMatrix(void);
261 GetFieldHandlePtr getHandleUseBeacon (void) const;
262 EditFieldHandlePtr editHandleUseBeacon (void);
264 /*! \} */
265 /*---------------------------------------------------------------------*/
266 /*! \name Sync */
267 /*! \{ */
269 #ifdef OSG_MT_CPTR_ASPECT
270 virtual void execSyncV( FieldContainer &oFrom,
271 ConstFieldMaskArg whichField,
272 AspectOffsetStore &oOffsets,
273 ConstFieldMaskArg syncMode ,
274 const UInt32 uiSyncInfo);
276 void execSync ( MatrixCameraBase *pFrom,
277 ConstFieldMaskArg whichField,
278 AspectOffsetStore &oOffsets,
279 ConstFieldMaskArg syncMode ,
280 const UInt32 uiSyncInfo);
281 #endif
283 /*! \} */
284 /*---------------------------------------------------------------------*/
285 /*! \name Edit */
286 /*! \{ */
288 /*! \} */
289 /*---------------------------------------------------------------------*/
290 /*! \name Aspect Create */
291 /*! \{ */
293 #ifdef OSG_MT_CPTR_ASPECT
294 virtual FieldContainer *createAspectCopy(
295 const FieldContainer *pRefAspect) const;
296 #endif
298 /*! \} */
299 /*---------------------------------------------------------------------*/
300 /*! \name Edit */
301 /*! \{ */
302 /*! \} */
303 /*---------------------------------------------------------------------*/
304 /*! \name Sync */
305 /*! \{ */
307 virtual void resolveLinks(void);
309 /*! \} */
310 /*========================== PRIVATE ================================*/
312 private:
313 /*---------------------------------------------------------------------*/
315 // prohibit default functions (move to 'public' if you need one)
316 void operator =(const MatrixCameraBase &source);
319 typedef MatrixCameraBase *MatrixCameraBaseP;
321 OSG_END_NAMESPACE
323 #endif /* _OSGMATRIXCAMERABASE_H_ */