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 MoveManipulator
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGMOVEMANIPULATORBASE_H_
55 #define _OSGMOVEMANIPULATORBASE_H_
61 #include "OSGConfig.h"
62 #include "OSGContribGUIDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGManipulator.h" // Parent
68 #include "OSGVecFields.h" // AxisBase type
70 #include "OSGMoveManipulatorFields.h"
75 class MoveManipulator
;
77 //! \brief MoveManipulator Base Class.
79 class OSG_CONTRIBGUI_DLLMAPPING MoveManipulatorBase
: public Manipulator
83 typedef Manipulator Inherited
;
84 typedef Manipulator ParentContainer
;
86 typedef Inherited::TypeObject TypeObject
;
87 typedef TypeObject::InitPhase InitPhase
;
89 OSG_GEN_INTERNALPTR(MoveManipulator
);
91 /*========================== PUBLIC =================================*/
97 AxisBaseFieldId
= Inherited::NextFieldId
,
98 AxisDirectionFieldId
= AxisBaseFieldId
+ 1,
99 BaseTranslationFieldId
= AxisDirectionFieldId
+ 1,
100 NextFieldId
= BaseTranslationFieldId
+ 1
103 static const OSG::BitVector AxisBaseFieldMask
=
104 (TypeTraits
<BitVector
>::One
<< AxisBaseFieldId
);
105 static const OSG::BitVector AxisDirectionFieldMask
=
106 (TypeTraits
<BitVector
>::One
<< AxisDirectionFieldId
);
107 static const OSG::BitVector BaseTranslationFieldMask
=
108 (TypeTraits
<BitVector
>::One
<< BaseTranslationFieldId
);
109 static const OSG::BitVector NextFieldMask
=
110 (TypeTraits
<BitVector
>::One
<< NextFieldId
);
112 typedef SFPnt3f SFAxisBaseType
;
113 typedef SFVec3f SFAxisDirectionType
;
114 typedef SFVec3f SFBaseTranslationType
;
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 Binary Access */
139 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
140 virtual void copyToBin (BinaryDataHandler
&pMem
,
141 ConstFieldMaskArg whichField
);
142 virtual void copyFromBin(BinaryDataHandler
&pMem
,
143 ConstFieldMaskArg whichField
);
147 /*---------------------------------------------------------------------*/
148 /*! \name Construction */
151 static MoveManipulatorTransitPtr
create (void);
152 static MoveManipulator
*createEmpty (void);
154 static MoveManipulatorTransitPtr
createLocal (
155 BitVector bFlags
= FCLocal::All
);
157 static MoveManipulator
*createEmptyLocal(
158 BitVector bFlags
= FCLocal::All
);
160 static MoveManipulatorTransitPtr
createDependent (BitVector bFlags
);
163 /*---------------------------------------------------------------------*/
167 virtual FieldContainerTransitPtr
shallowCopy (void) const;
168 virtual FieldContainerTransitPtr
shallowCopyLocal(
169 BitVector bFlags
= FCLocal::All
) const;
170 virtual FieldContainerTransitPtr
shallowCopyDependent(
171 BitVector bFlags
) const;
174 /*========================= PROTECTED ===============================*/
178 static TypeObject _type
;
180 static void classDescInserter(TypeObject
&oType
);
181 static const Char8
*getClassname (void );
183 /*---------------------------------------------------------------------*/
188 SFVec3f _sfAxisDirection
;
189 SFVec3f _sfBaseTranslation
;
192 /*---------------------------------------------------------------------*/
193 /*! \name Constructors */
196 MoveManipulatorBase(void);
197 MoveManipulatorBase(const MoveManipulatorBase
&source
);
200 /*---------------------------------------------------------------------*/
201 /*! \name Destructors */
204 virtual ~MoveManipulatorBase(void);
207 /*---------------------------------------------------------------------*/
208 /*! \name onCreate */
213 /*---------------------------------------------------------------------*/
214 /*! \name Generic Field Access */
217 GetFieldHandlePtr
getHandleAxisBase (void) const;
218 EditFieldHandlePtr
editHandleAxisBase (void);
219 GetFieldHandlePtr
getHandleAxisDirection (void) const;
220 EditFieldHandlePtr
editHandleAxisDirection (void);
221 GetFieldHandlePtr
getHandleBaseTranslation (void) const;
222 EditFieldHandlePtr
editHandleBaseTranslation(void);
225 /*---------------------------------------------------------------------*/
226 /*! \name Field Get */
230 SFPnt3f
*editSFAxisBase (void);
231 const SFPnt3f
*getSFAxisBase (void) const;
233 SFVec3f
*editSFAxisDirection (void);
234 const SFVec3f
*getSFAxisDirection (void) const;
236 SFVec3f
*editSFBaseTranslation(void);
237 const SFVec3f
*getSFBaseTranslation (void) const;
240 Pnt3f
&editAxisBase (void);
241 const Pnt3f
&getAxisBase (void) const;
243 Vec3f
&editAxisDirection (void);
244 const Vec3f
&getAxisDirection (void) const;
246 Vec3f
&editBaseTranslation(void);
247 const Vec3f
&getBaseTranslation (void) const;
250 /*---------------------------------------------------------------------*/
251 /*! \name Field Set */
254 void setAxisBase (const Pnt3f
&value
);
255 void setAxisDirection (const Vec3f
&value
);
256 void setBaseTranslation(const Vec3f
&value
);
259 /*---------------------------------------------------------------------*/
260 /*! \name Ptr MField Set */
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 ( MoveManipulatorBase
*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 MoveManipulatorBase
&source
);
318 typedef MoveManipulatorBase
*MoveManipulatorBaseP
;
322 #endif /* _OSGMOVEMANIPULATORBASE_H_ */