fixed: compile issue
[opensg.git] / Source / Contrib / Manipulators / OSGMoveManipulatorBase.h
blobae4254de22d316d5026b6eac5bf7c108289d1f46
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 MoveManipulator
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGMOVEMANIPULATORBASE_H_
55 #define _OSGMOVEMANIPULATORBASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
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"
72 OSG_BEGIN_NAMESPACE
75 class MoveManipulator;
77 //! \brief MoveManipulator Base Class.
79 class OSG_CONTRIBGUI_DLLMAPPING MoveManipulatorBase : public Manipulator
81 public:
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 =================================*/
93 public:
95 enum
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 */
118 /*! \{ */
120 static FieldContainerType &getClassType (void);
121 static UInt32 getClassTypeId (void);
122 static UInt16 getClassGroupId(void);
124 /*! \} */
125 /*---------------------------------------------------------------------*/
126 /*! \name FieldContainer Get */
127 /*! \{ */
129 virtual FieldContainerType &getType (void);
130 virtual const FieldContainerType &getType (void) const;
132 virtual UInt32 getContainerSize(void) const;
134 /*! \} */
135 /*---------------------------------------------------------------------*/
136 /*! \name Binary Access */
137 /*! \{ */
139 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
140 virtual void copyToBin (BinaryDataHandler &pMem,
141 ConstFieldMaskArg whichField);
142 virtual void copyFromBin(BinaryDataHandler &pMem,
143 ConstFieldMaskArg whichField);
146 /*! \} */
147 /*---------------------------------------------------------------------*/
148 /*! \name Construction */
149 /*! \{ */
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);
162 /*! \} */
163 /*---------------------------------------------------------------------*/
164 /*! \name Copy */
165 /*! \{ */
167 virtual FieldContainerTransitPtr shallowCopy (void) const;
168 virtual FieldContainerTransitPtr shallowCopyLocal(
169 BitVector bFlags = FCLocal::All) const;
170 virtual FieldContainerTransitPtr shallowCopyDependent(
171 BitVector bFlags) const;
173 /*! \} */
174 /*========================= PROTECTED ===============================*/
176 protected:
178 static TypeObject _type;
180 static void classDescInserter(TypeObject &oType);
181 static const Char8 *getClassname (void );
183 /*---------------------------------------------------------------------*/
184 /*! \name Fields */
185 /*! \{ */
187 SFPnt3f _sfAxisBase;
188 SFVec3f _sfAxisDirection;
189 SFVec3f _sfBaseTranslation;
191 /*! \} */
192 /*---------------------------------------------------------------------*/
193 /*! \name Constructors */
194 /*! \{ */
196 MoveManipulatorBase(void);
197 MoveManipulatorBase(const MoveManipulatorBase &source);
199 /*! \} */
200 /*---------------------------------------------------------------------*/
201 /*! \name Destructors */
202 /*! \{ */
204 virtual ~MoveManipulatorBase(void);
206 /*! \} */
207 /*---------------------------------------------------------------------*/
208 /*! \name onCreate */
209 /*! \{ */
212 /*! \} */
213 /*---------------------------------------------------------------------*/
214 /*! \name Generic Field Access */
215 /*! \{ */
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);
224 /*! \} */
225 /*---------------------------------------------------------------------*/
226 /*! \name Field Get */
227 /*! \{ */
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;
249 /*! \} */
250 /*---------------------------------------------------------------------*/
251 /*! \name Field Set */
252 /*! \{ */
254 void setAxisBase (const Pnt3f &value);
255 void setAxisDirection (const Vec3f &value);
256 void setBaseTranslation(const Vec3f &value);
258 /*! \} */
259 /*---------------------------------------------------------------------*/
260 /*! \name Ptr MField Set */
261 /*! \{ */
263 /*! \} */
264 /*---------------------------------------------------------------------*/
265 /*! \name Sync */
266 /*! \{ */
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);
280 #endif
282 /*! \} */
283 /*---------------------------------------------------------------------*/
284 /*! \name Edit */
285 /*! \{ */
287 /*! \} */
288 /*---------------------------------------------------------------------*/
289 /*! \name Aspect Create */
290 /*! \{ */
292 #ifdef OSG_MT_CPTR_ASPECT
293 virtual FieldContainer *createAspectCopy(
294 const FieldContainer *pRefAspect) const;
295 #endif
297 /*! \} */
298 /*---------------------------------------------------------------------*/
299 /*! \name Edit */
300 /*! \{ */
301 /*! \} */
302 /*---------------------------------------------------------------------*/
303 /*! \name Sync */
304 /*! \{ */
306 virtual void resolveLinks(void);
308 /*! \} */
309 /*========================== PRIVATE ================================*/
311 private:
312 /*---------------------------------------------------------------------*/
314 // prohibit default functions (move to 'public' if you need one)
315 void operator =(const MoveManipulatorBase &source);
318 typedef MoveManipulatorBase *MoveManipulatorBaseP;
320 OSG_END_NAMESPACE
322 #endif /* _OSGMOVEMANIPULATORBASE_H_ */