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 PlaneMoveManipulator
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGPLANEMOVEMANIPULATORBASE_H_
55 #define _OSGPLANEMOVEMANIPULATORBASE_H_
61 #include "OSGConfig.h"
62 #include "OSGContribGUIDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGManipulator.h" // Parent
68 #include "OSGSysFields.h" // Axis type
69 #include "OSGVecFields.h" // BaseTranslation type
70 #include "OSGMathFields.h" // BaseRotation type
72 #include "OSGPlaneMoveManipulatorFields.h"
77 class PlaneMoveManipulator
;
79 //! \brief PlaneMoveManipulator Base Class.
81 class OSG_CONTRIBGUI_DLLMAPPING PlaneMoveManipulatorBase
: public Manipulator
85 typedef Manipulator Inherited
;
86 typedef Manipulator ParentContainer
;
88 typedef Inherited::TypeObject TypeObject
;
89 typedef TypeObject::InitPhase InitPhase
;
91 OSG_GEN_INTERNALPTR(PlaneMoveManipulator
);
93 /*========================== PUBLIC =================================*/
99 AxisFieldId
= Inherited::NextFieldId
,
100 BaseTranslationFieldId
= AxisFieldId
+ 1,
101 BaseRotationFieldId
= BaseTranslationFieldId
+ 1,
102 ClickPointFieldId
= BaseRotationFieldId
+ 1,
103 NextFieldId
= ClickPointFieldId
+ 1
106 static const OSG::BitVector AxisFieldMask
=
107 (TypeTraits
<BitVector
>::One
<< AxisFieldId
);
108 static const OSG::BitVector BaseTranslationFieldMask
=
109 (TypeTraits
<BitVector
>::One
<< BaseTranslationFieldId
);
110 static const OSG::BitVector BaseRotationFieldMask
=
111 (TypeTraits
<BitVector
>::One
<< BaseRotationFieldId
);
112 static const OSG::BitVector ClickPointFieldMask
=
113 (TypeTraits
<BitVector
>::One
<< ClickPointFieldId
);
114 static const OSG::BitVector NextFieldMask
=
115 (TypeTraits
<BitVector
>::One
<< NextFieldId
);
117 typedef SFUInt16 SFAxisType
;
118 typedef SFVec3f SFBaseTranslationType
;
119 typedef SFQuaternion SFBaseRotationType
;
120 typedef SFPnt3f SFClickPointType
;
122 /*---------------------------------------------------------------------*/
123 /*! \name Class Get */
126 static FieldContainerType
&getClassType (void);
127 static UInt32
getClassTypeId (void);
128 static UInt16
getClassGroupId(void);
131 /*---------------------------------------------------------------------*/
132 /*! \name FieldContainer Get */
135 virtual FieldContainerType
&getType (void);
136 virtual const FieldContainerType
&getType (void) const;
138 virtual UInt32
getContainerSize(void) const;
141 /*---------------------------------------------------------------------*/
142 /*! \name Binary Access */
145 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
146 virtual void copyToBin (BinaryDataHandler
&pMem
,
147 ConstFieldMaskArg whichField
);
148 virtual void copyFromBin(BinaryDataHandler
&pMem
,
149 ConstFieldMaskArg whichField
);
153 /*---------------------------------------------------------------------*/
154 /*! \name Construction */
157 static PlaneMoveManipulatorTransitPtr
create (void);
158 static PlaneMoveManipulator
*createEmpty (void);
160 static PlaneMoveManipulatorTransitPtr
createLocal (
161 BitVector bFlags
= FCLocal::All
);
163 static PlaneMoveManipulator
*createEmptyLocal(
164 BitVector bFlags
= FCLocal::All
);
166 static PlaneMoveManipulatorTransitPtr
createDependent (BitVector bFlags
);
169 /*---------------------------------------------------------------------*/
173 virtual FieldContainerTransitPtr
shallowCopy (void) const;
174 virtual FieldContainerTransitPtr
shallowCopyLocal(
175 BitVector bFlags
= FCLocal::All
) const;
176 virtual FieldContainerTransitPtr
shallowCopyDependent(
177 BitVector bFlags
) const;
180 /*========================= PROTECTED ===============================*/
184 static TypeObject _type
;
186 static void classDescInserter(TypeObject
&oType
);
187 static const Char8
*getClassname (void );
189 /*---------------------------------------------------------------------*/
194 SFVec3f _sfBaseTranslation
;
195 SFQuaternion _sfBaseRotation
;
196 SFPnt3f _sfClickPoint
;
199 /*---------------------------------------------------------------------*/
200 /*! \name Constructors */
203 PlaneMoveManipulatorBase(void);
204 PlaneMoveManipulatorBase(const PlaneMoveManipulatorBase
&source
);
207 /*---------------------------------------------------------------------*/
208 /*! \name Destructors */
211 virtual ~PlaneMoveManipulatorBase(void);
214 /*---------------------------------------------------------------------*/
215 /*! \name onCreate */
220 /*---------------------------------------------------------------------*/
221 /*! \name Generic Field Access */
224 GetFieldHandlePtr
getHandleAxis (void) const;
225 EditFieldHandlePtr
editHandleAxis (void);
226 GetFieldHandlePtr
getHandleBaseTranslation (void) const;
227 EditFieldHandlePtr
editHandleBaseTranslation(void);
228 GetFieldHandlePtr
getHandleBaseRotation (void) const;
229 EditFieldHandlePtr
editHandleBaseRotation (void);
230 GetFieldHandlePtr
getHandleClickPoint (void) const;
231 EditFieldHandlePtr
editHandleClickPoint (void);
234 /*---------------------------------------------------------------------*/
235 /*! \name Field Get */
239 SFUInt16
*editSFAxis (void);
240 const SFUInt16
*getSFAxis (void) const;
242 SFVec3f
*editSFBaseTranslation(void);
243 const SFVec3f
*getSFBaseTranslation (void) const;
245 SFQuaternion
*editSFBaseRotation (void);
246 const SFQuaternion
*getSFBaseRotation (void) const;
248 SFPnt3f
*editSFClickPoint (void);
249 const SFPnt3f
*getSFClickPoint (void) const;
252 UInt16
&editAxis (void);
253 UInt16
getAxis (void) const;
255 Vec3f
&editBaseTranslation(void);
256 const Vec3f
&getBaseTranslation (void) const;
258 Quaternion
&editBaseRotation (void);
259 const Quaternion
&getBaseRotation (void) const;
261 Pnt3f
&editClickPoint (void);
262 const Pnt3f
&getClickPoint (void) const;
265 /*---------------------------------------------------------------------*/
266 /*! \name Field Set */
269 void setAxis (const UInt16 value
);
270 void setBaseTranslation(const Vec3f
&value
);
271 void setBaseRotation (const Quaternion
&value
);
272 void setClickPoint (const Pnt3f
&value
);
275 /*---------------------------------------------------------------------*/
276 /*! \name Ptr MField Set */
280 /*---------------------------------------------------------------------*/
284 #ifdef OSG_MT_CPTR_ASPECT
285 virtual void execSyncV( FieldContainer
&oFrom
,
286 ConstFieldMaskArg whichField
,
287 AspectOffsetStore
&oOffsets
,
288 ConstFieldMaskArg syncMode
,
289 const UInt32 uiSyncInfo
);
291 void execSync ( PlaneMoveManipulatorBase
*pFrom
,
292 ConstFieldMaskArg whichField
,
293 AspectOffsetStore
&oOffsets
,
294 ConstFieldMaskArg syncMode
,
295 const UInt32 uiSyncInfo
);
299 /*---------------------------------------------------------------------*/
304 /*---------------------------------------------------------------------*/
305 /*! \name Aspect Create */
308 #ifdef OSG_MT_CPTR_ASPECT
309 virtual FieldContainer
*createAspectCopy(
310 const FieldContainer
*pRefAspect
) const;
314 /*---------------------------------------------------------------------*/
318 /*---------------------------------------------------------------------*/
322 virtual void resolveLinks(void);
325 /*========================== PRIVATE ================================*/
328 /*---------------------------------------------------------------------*/
330 // prohibit default functions (move to 'public' if you need one)
331 void operator =(const PlaneMoveManipulatorBase
&source
);
334 typedef PlaneMoveManipulatorBase
*PlaneMoveManipulatorBaseP
;
338 #endif /* _OSGPLANEMOVEMANIPULATORBASE_H_ */