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 **
48 ** class OrthographicCamera
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGORTHOGRAPHICCAMERABASE_H_
55 #define _OSGORTHOGRAPHICCAMERABASE_H_
61 #include "OSGConfig.h"
62 #include "OSGWindowDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGCamera.h" // Parent
68 #include "OSGSysFields.h" // VerticalSize type
70 #include "OSGOrthographicCameraFields.h"
75 class OrthographicCamera
;
77 //! \brief OrthographicCamera Base Class.
79 class OSG_WINDOW_DLLMAPPING OrthographicCameraBase
: public Camera
83 typedef Camera Inherited
;
84 typedef Camera ParentContainer
;
86 typedef Inherited::TypeObject TypeObject
;
87 typedef TypeObject::InitPhase InitPhase
;
89 OSG_GEN_INTERNALPTR(OrthographicCamera
);
91 /*========================== PUBLIC =================================*/
97 VerticalSizeFieldId
= Inherited::NextFieldId
,
98 HorizontalSizeFieldId
= VerticalSizeFieldId
+ 1,
99 AspectFieldId
= HorizontalSizeFieldId
+ 1,
100 NextFieldId
= AspectFieldId
+ 1
103 static const OSG::BitVector VerticalSizeFieldMask
=
104 (TypeTraits
<BitVector
>::One
<< VerticalSizeFieldId
);
105 static const OSG::BitVector HorizontalSizeFieldMask
=
106 (TypeTraits
<BitVector
>::One
<< HorizontalSizeFieldId
);
107 static const OSG::BitVector AspectFieldMask
=
108 (TypeTraits
<BitVector
>::One
<< AspectFieldId
);
109 static const OSG::BitVector NextFieldMask
=
110 (TypeTraits
<BitVector
>::One
<< NextFieldId
);
112 typedef SFReal32 SFVerticalSizeType
;
113 typedef SFReal32 SFHorizontalSizeType
;
114 typedef SFReal32 SFAspectType
;
116 /*---------------------------------------------------------------------*/
117 /*! \name Class Get */
120 static FieldContainerType
&getClassType (void);
121 static UInt32
getClassTypeId (void);
122 static UInt16
getClassGroupId(void);
125 /*---------------------------------------------------------------------*/
126 /*! \name FieldContainer Get */
129 virtual FieldContainerType
&getType (void);
130 virtual const FieldContainerType
&getType (void) const;
132 virtual UInt32
getContainerSize(void) const;
135 /*---------------------------------------------------------------------*/
136 /*! \name Field Get */
140 SFReal32
*editSFVerticalSize (void);
141 const SFReal32
*getSFVerticalSize (void) const;
143 SFReal32
*editSFHorizontalSize (void);
144 const SFReal32
*getSFHorizontalSize (void) const;
146 SFReal32
*editSFAspect (void);
147 const SFReal32
*getSFAspect (void) const;
150 Real32
&editVerticalSize (void);
151 Real32
getVerticalSize (void) const;
153 Real32
&editHorizontalSize (void);
154 Real32
getHorizontalSize (void) const;
156 Real32
&editAspect (void);
157 Real32
getAspect (void) const;
160 /*---------------------------------------------------------------------*/
161 /*! \name Field Set */
164 void setVerticalSize (const Real32 value
);
165 void setHorizontalSize (const Real32 value
);
166 void setAspect (const Real32 value
);
169 /*---------------------------------------------------------------------*/
170 /*! \name Ptr MField Set */
174 /*---------------------------------------------------------------------*/
175 /*! \name Binary Access */
178 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
179 virtual void copyToBin (BinaryDataHandler
&pMem
,
180 ConstFieldMaskArg whichField
);
181 virtual void copyFromBin(BinaryDataHandler
&pMem
,
182 ConstFieldMaskArg whichField
);
186 /*---------------------------------------------------------------------*/
187 /*! \name Construction */
190 static OrthographicCameraTransitPtr
create (void);
191 static OrthographicCamera
*createEmpty (void);
193 static OrthographicCameraTransitPtr
createLocal (
194 BitVector bFlags
= FCLocal::All
);
196 static OrthographicCamera
*createEmptyLocal(
197 BitVector bFlags
= FCLocal::All
);
199 static OrthographicCameraTransitPtr
createDependent (BitVector bFlags
);
202 /*---------------------------------------------------------------------*/
206 virtual FieldContainerTransitPtr
shallowCopy (void) const;
207 virtual FieldContainerTransitPtr
shallowCopyLocal(
208 BitVector bFlags
= FCLocal::All
) const;
209 virtual FieldContainerTransitPtr
shallowCopyDependent(
210 BitVector bFlags
) const;
213 /*========================= PROTECTED ===============================*/
217 static TypeObject _type
;
219 static void classDescInserter(TypeObject
&oType
);
220 static const Char8
*getClassname (void );
222 /*---------------------------------------------------------------------*/
226 SFReal32 _sfVerticalSize
;
227 SFReal32 _sfHorizontalSize
;
231 /*---------------------------------------------------------------------*/
232 /*! \name Constructors */
235 OrthographicCameraBase(void);
236 OrthographicCameraBase(const OrthographicCameraBase
&source
);
239 /*---------------------------------------------------------------------*/
240 /*! \name Destructors */
243 virtual ~OrthographicCameraBase(void);
246 /*---------------------------------------------------------------------*/
247 /*! \name onCreate */
252 /*---------------------------------------------------------------------*/
253 /*! \name Generic Field Access */
256 GetFieldHandlePtr
getHandleVerticalSize (void) const;
257 EditFieldHandlePtr
editHandleVerticalSize (void);
258 GetFieldHandlePtr
getHandleHorizontalSize (void) const;
259 EditFieldHandlePtr
editHandleHorizontalSize (void);
260 GetFieldHandlePtr
getHandleAspect (void) const;
261 EditFieldHandlePtr
editHandleAspect (void);
264 /*---------------------------------------------------------------------*/
268 #ifdef OSG_MT_CPTR_ASPECT
269 virtual void execSyncV( FieldContainer
&oFrom
,
270 ConstFieldMaskArg whichField
,
271 AspectOffsetStore
&oOffsets
,
272 ConstFieldMaskArg syncMode
,
273 const UInt32 uiSyncInfo
);
275 void execSync ( OrthographicCameraBase
*pFrom
,
276 ConstFieldMaskArg whichField
,
277 AspectOffsetStore
&oOffsets
,
278 ConstFieldMaskArg syncMode
,
279 const UInt32 uiSyncInfo
);
283 /*---------------------------------------------------------------------*/
288 /*---------------------------------------------------------------------*/
289 /*! \name Aspect Create */
292 #ifdef OSG_MT_CPTR_ASPECT
293 virtual FieldContainer
*createAspectCopy(
294 const FieldContainer
*pRefAspect
) const;
298 /*---------------------------------------------------------------------*/
302 /*---------------------------------------------------------------------*/
306 virtual void resolveLinks(void);
309 /*========================== PRIVATE ================================*/
312 /*---------------------------------------------------------------------*/
314 // prohibit default functions (move to 'public' if you need one)
315 void operator =(const OrthographicCameraBase
&source
);
318 typedef OrthographicCameraBase
*OrthographicCameraBaseP
;
322 #endif /* _OSGORTHOGRAPHICCAMERABASE_H_ */