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 _OSGMATRIXCAMERABASE_H_
55 #define _OSGMATRIXCAMERABASE_H_
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"
78 //! \brief MatrixCamera Base Class.
80 class OSG_SYSTEM_DLLMAPPING MatrixCameraBase
: public Camera
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 =================================*/
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 */
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 */
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;
161 /*---------------------------------------------------------------------*/
162 /*! \name Field Set */
165 void setProjectionMatrix(const Matrix
&value
);
166 void setModelviewMatrix(const Matrix
&value
);
167 void setUseBeacon (const bool value
);
170 /*---------------------------------------------------------------------*/
171 /*! \name Ptr MField Set */
175 /*---------------------------------------------------------------------*/
176 /*! \name Binary Access */
179 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
180 virtual void copyToBin (BinaryDataHandler
&pMem
,
181 ConstFieldMaskArg whichField
);
182 virtual void copyFromBin(BinaryDataHandler
&pMem
,
183 ConstFieldMaskArg whichField
);
187 /*---------------------------------------------------------------------*/
188 /*! \name Construction */
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
);
203 /*---------------------------------------------------------------------*/
207 virtual FieldContainerTransitPtr
shallowCopy (void) const;
208 virtual FieldContainerTransitPtr
shallowCopyLocal(
209 BitVector bFlags
= FCLocal::All
) const;
210 virtual FieldContainerTransitPtr
shallowCopyDependent(
211 BitVector bFlags
) const;
214 /*========================= PROTECTED ===============================*/
218 static TypeObject _type
;
220 static void classDescInserter(TypeObject
&oType
);
221 static const Char8
*getClassname (void );
223 /*---------------------------------------------------------------------*/
227 SFMatrix _sfProjectionMatrix
;
228 SFMatrix _sfModelviewMatrix
;
232 /*---------------------------------------------------------------------*/
233 /*! \name Constructors */
236 MatrixCameraBase(void);
237 MatrixCameraBase(const MatrixCameraBase
&source
);
240 /*---------------------------------------------------------------------*/
241 /*! \name Destructors */
244 virtual ~MatrixCameraBase(void);
247 /*---------------------------------------------------------------------*/
248 /*! \name onCreate */
253 /*---------------------------------------------------------------------*/
254 /*! \name Generic Field Access */
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);
265 /*---------------------------------------------------------------------*/
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
);
284 /*---------------------------------------------------------------------*/
289 /*---------------------------------------------------------------------*/
290 /*! \name Aspect Create */
293 #ifdef OSG_MT_CPTR_ASPECT
294 virtual FieldContainer
*createAspectCopy(
295 const FieldContainer
*pRefAspect
) const;
299 /*---------------------------------------------------------------------*/
303 /*---------------------------------------------------------------------*/
307 virtual void resolveLinks(void);
310 /*========================== PRIVATE ================================*/
313 /*---------------------------------------------------------------------*/
315 // prohibit default functions (move to 'public' if you need one)
316 void operator =(const MatrixCameraBase
&source
);
319 typedef MatrixCameraBase
*MatrixCameraBaseP
;
323 #endif /* _OSGMATRIXCAMERABASE_H_ */