fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / NodeCores / Groups / Misc / OSGTransformBase.h
blob8c349a14e53f7e2436b19760037d74bcc07f0d24
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 Transform
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGTRANSFORMBASE_H_
55 #define _OSGTRANSFORMBASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
61 #include "OSGConfig.h"
62 #include "OSGGroupDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGGroup.h" // Parent
68 #include "OSGMathFields.h" // Matrix type
70 #include "OSGTransformFields.h"
72 OSG_BEGIN_NAMESPACE
75 class Transform;
77 //! \brief Transform Base Class.
79 class OSG_GROUP_DLLMAPPING TransformBase : public Group
81 public:
83 typedef Group Inherited;
84 typedef Group ParentContainer;
86 typedef Inherited::TypeObject TypeObject;
87 typedef TypeObject::InitPhase InitPhase;
89 OSG_GEN_INTERNALPTR(Transform);
91 /*========================== PUBLIC =================================*/
93 public:
95 enum
97 MatrixFieldId = Inherited::NextFieldId,
98 NextFieldId = MatrixFieldId + 1
101 static const OSG::BitVector MatrixFieldMask =
102 (TypeTraits<BitVector>::One << MatrixFieldId);
103 static const OSG::BitVector NextFieldMask =
104 (TypeTraits<BitVector>::One << NextFieldId);
106 typedef SFMatrix SFMatrixType;
108 /*---------------------------------------------------------------------*/
109 /*! \name Class Get */
110 /*! \{ */
112 static FieldContainerType &getClassType (void);
113 static UInt32 getClassTypeId (void);
114 static UInt16 getClassGroupId(void);
116 /*! \} */
117 /*---------------------------------------------------------------------*/
118 /*! \name FieldContainer Get */
119 /*! \{ */
121 virtual FieldContainerType &getType (void);
122 virtual const FieldContainerType &getType (void) const;
124 virtual UInt32 getContainerSize(void) const;
126 /*! \} */
127 /*---------------------------------------------------------------------*/
128 /*! \name Field Get */
129 /*! \{ */
132 SFMatrix *editSFMatrix (void);
133 const SFMatrix *getSFMatrix (void) const;
136 Matrix &editMatrix (void);
137 const Matrix &getMatrix (void) const;
139 /*! \} */
140 /*---------------------------------------------------------------------*/
141 /*! \name Field Set */
142 /*! \{ */
144 void setMatrix (const Matrix &value);
146 /*! \} */
147 /*---------------------------------------------------------------------*/
148 /*! \name Ptr MField Set */
149 /*! \{ */
151 /*! \} */
152 /*---------------------------------------------------------------------*/
153 /*! \name Binary Access */
154 /*! \{ */
156 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
157 virtual void copyToBin (BinaryDataHandler &pMem,
158 ConstFieldMaskArg whichField);
159 virtual void copyFromBin(BinaryDataHandler &pMem,
160 ConstFieldMaskArg whichField);
163 /*! \} */
164 /*---------------------------------------------------------------------*/
165 /*! \name Construction */
166 /*! \{ */
168 static TransformTransitPtr create (void);
169 static Transform *createEmpty (void);
171 static TransformTransitPtr createLocal (
172 BitVector bFlags = FCLocal::All);
174 static Transform *createEmptyLocal(
175 BitVector bFlags = FCLocal::All);
177 static TransformTransitPtr createDependent (BitVector bFlags);
179 /*! \} */
180 /*---------------------------------------------------------------------*/
181 /*! \name Copy */
182 /*! \{ */
184 virtual FieldContainerTransitPtr shallowCopy (void) const;
185 virtual FieldContainerTransitPtr shallowCopyLocal(
186 BitVector bFlags = FCLocal::All) const;
187 virtual FieldContainerTransitPtr shallowCopyDependent(
188 BitVector bFlags) const;
190 /*! \} */
191 /*========================= PROTECTED ===============================*/
193 protected:
195 static TypeObject _type;
197 static void classDescInserter(TypeObject &oType);
198 static const Char8 *getClassname (void );
200 /*---------------------------------------------------------------------*/
201 /*! \name Fields */
202 /*! \{ */
204 SFMatrix _sfMatrix;
206 /*! \} */
207 /*---------------------------------------------------------------------*/
208 /*! \name Constructors */
209 /*! \{ */
211 TransformBase(void);
212 TransformBase(const TransformBase &source);
214 /*! \} */
215 /*---------------------------------------------------------------------*/
216 /*! \name Destructors */
217 /*! \{ */
219 virtual ~TransformBase(void);
221 /*! \} */
222 /*---------------------------------------------------------------------*/
223 /*! \name onCreate */
224 /*! \{ */
227 /*! \} */
228 /*---------------------------------------------------------------------*/
229 /*! \name Generic Field Access */
230 /*! \{ */
232 GetFieldHandlePtr getHandleMatrix (void) const;
233 EditFieldHandlePtr editHandleMatrix (void);
235 /*! \} */
236 /*---------------------------------------------------------------------*/
237 /*! \name Sync */
238 /*! \{ */
240 #ifdef OSG_MT_CPTR_ASPECT
241 virtual void execSyncV( FieldContainer &oFrom,
242 ConstFieldMaskArg whichField,
243 AspectOffsetStore &oOffsets,
244 ConstFieldMaskArg syncMode ,
245 const UInt32 uiSyncInfo);
247 void execSync ( TransformBase *pFrom,
248 ConstFieldMaskArg whichField,
249 AspectOffsetStore &oOffsets,
250 ConstFieldMaskArg syncMode ,
251 const UInt32 uiSyncInfo);
252 #endif
254 /*! \} */
255 /*---------------------------------------------------------------------*/
256 /*! \name Edit */
257 /*! \{ */
259 /*! \} */
260 /*---------------------------------------------------------------------*/
261 /*! \name Aspect Create */
262 /*! \{ */
264 #ifdef OSG_MT_CPTR_ASPECT
265 virtual FieldContainer *createAspectCopy(
266 const FieldContainer *pRefAspect) const;
267 #endif
269 /*! \} */
270 /*---------------------------------------------------------------------*/
271 /*! \name Edit */
272 /*! \{ */
273 /*! \} */
274 /*---------------------------------------------------------------------*/
275 /*! \name Sync */
276 /*! \{ */
278 virtual void resolveLinks(void);
280 /*! \} */
281 /*========================== PRIVATE ================================*/
283 private:
284 /*---------------------------------------------------------------------*/
286 // prohibit default functions (move to 'public' if you need one)
287 void operator =(const TransformBase &source);
290 typedef TransformBase *TransformBaseP;
292 typedef CoredNodeRefPtr <Transform> TransformNodeRefPtr;
293 typedef CoredNodeMTRefPtr<Transform> TransformNodeMTRefPtr;
295 OSG_END_NAMESPACE
297 #endif /* _OSGTRANSFORMBASE_H_ */