fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / NodeCores / Drawables / Geometry / Util / OSGKDTreeIntersectProxyAttachmentBase.h
blob0e1493b69c4e076694642fb3139289cc5a6118c9
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 KDTreeIntersectProxyAttachment
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGKDTREEINTERSECTPROXYATTACHMENTBASE_H_
55 #define _OSGKDTREEINTERSECTPROXYATTACHMENTBASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
61 #include "OSGConfig.h"
62 #include "OSGDrawableDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGIntersectProxyAttachment.h" // Parent
68 #include "OSGGeometryFields.h" // Geometry type
69 #include "OSGSysFields.h" // MaxDepth type
70 #include "OSGIntersectKDTreeNodeFields.h" // TreeNodes type
72 #include "OSGKDTreeIntersectProxyAttachmentFields.h"
74 OSG_BEGIN_NAMESPACE
77 class KDTreeIntersectProxyAttachment;
79 //! \brief KDTreeIntersectProxyAttachment Base Class.
81 class OSG_DRAWABLE_DLLMAPPING KDTreeIntersectProxyAttachmentBase : public IntersectProxyAttachment
83 public:
85 typedef IntersectProxyAttachment Inherited;
86 typedef IntersectProxyAttachment ParentContainer;
88 typedef Inherited::TypeObject TypeObject;
89 typedef TypeObject::InitPhase InitPhase;
91 OSG_GEN_INTERNALPTR(KDTreeIntersectProxyAttachment);
93 /*========================== PUBLIC =================================*/
95 public:
97 enum
99 GeometryFieldId = Inherited::NextFieldId,
100 MaxDepthFieldId = GeometryFieldId + 1,
101 TreeNodesFieldId = MaxDepthFieldId + 1,
102 TriIndicesFieldId = TreeNodesFieldId + 1,
103 NextFieldId = TriIndicesFieldId + 1
106 static const OSG::BitVector GeometryFieldMask =
107 (TypeTraits<BitVector>::One << GeometryFieldId);
108 static const OSG::BitVector MaxDepthFieldMask =
109 (TypeTraits<BitVector>::One << MaxDepthFieldId);
110 static const OSG::BitVector TreeNodesFieldMask =
111 (TypeTraits<BitVector>::One << TreeNodesFieldId);
112 static const OSG::BitVector TriIndicesFieldMask =
113 (TypeTraits<BitVector>::One << TriIndicesFieldId);
114 static const OSG::BitVector NextFieldMask =
115 (TypeTraits<BitVector>::One << NextFieldId);
117 typedef SFUnrecGeometryPtr SFGeometryType;
118 typedef SFInt32 SFMaxDepthType;
119 typedef MFIntersectKDTreeNode MFTreeNodesType;
120 typedef MFUInt32 MFTriIndicesType;
122 /*---------------------------------------------------------------------*/
123 /*! \name Class Get */
124 /*! \{ */
126 static FieldContainerType &getClassType (void);
127 static UInt32 getClassTypeId (void);
128 static UInt16 getClassGroupId(void);
130 /*! \} */
131 /*---------------------------------------------------------------------*/
132 /*! \name FieldContainer Get */
133 /*! \{ */
135 virtual FieldContainerType &getType (void);
136 virtual const FieldContainerType &getType (void) const;
138 virtual UInt32 getContainerSize(void) const;
140 /*! \} */
141 /*---------------------------------------------------------------------*/
142 /*! \name Field Get */
143 /*! \{ */
145 const SFUnrecGeometryPtr *getSFGeometry (void) const;
146 SFUnrecGeometryPtr *editSFGeometry (void);
148 SFInt32 *editSFMaxDepth (void);
149 const SFInt32 *getSFMaxDepth (void) const;
152 Geometry * getGeometry (void) const;
154 Int32 &editMaxDepth (void);
155 Int32 getMaxDepth (void) const;
157 /*! \} */
158 /*---------------------------------------------------------------------*/
159 /*! \name Field Set */
160 /*! \{ */
162 void setGeometry (Geometry * const value);
163 void setMaxDepth (const Int32 value);
165 /*! \} */
166 /*---------------------------------------------------------------------*/
167 /*! \name Ptr Field Set */
168 /*! \{ */
170 /*! \} */
171 /*---------------------------------------------------------------------*/
172 /*! \name Ptr MField Set */
173 /*! \{ */
175 /*! \} */
176 /*---------------------------------------------------------------------*/
177 /*! \name Binary Access */
178 /*! \{ */
180 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
181 virtual void copyToBin (BinaryDataHandler &pMem,
182 ConstFieldMaskArg whichField);
183 virtual void copyFromBin(BinaryDataHandler &pMem,
184 ConstFieldMaskArg whichField);
187 /*! \} */
188 /*---------------------------------------------------------------------*/
189 /*! \name Construction */
190 /*! \{ */
192 static KDTreeIntersectProxyAttachmentTransitPtr create (void);
193 static KDTreeIntersectProxyAttachment *createEmpty (void);
195 static KDTreeIntersectProxyAttachmentTransitPtr createLocal (
196 BitVector bFlags = FCLocal::All);
198 static KDTreeIntersectProxyAttachment *createEmptyLocal(
199 BitVector bFlags = FCLocal::All);
201 static KDTreeIntersectProxyAttachmentTransitPtr createDependent (BitVector bFlags);
203 /*! \} */
204 /*---------------------------------------------------------------------*/
205 /*! \name Copy */
206 /*! \{ */
208 virtual FieldContainerTransitPtr shallowCopy (void) const;
209 virtual FieldContainerTransitPtr shallowCopyLocal(
210 BitVector bFlags = FCLocal::All) const;
211 virtual FieldContainerTransitPtr shallowCopyDependent(
212 BitVector bFlags) const;
214 /*! \} */
215 /*========================= PROTECTED ===============================*/
217 protected:
219 static TypeObject _type;
221 static void classDescInserter(TypeObject &oType);
222 static const Char8 *getClassname (void );
224 /*---------------------------------------------------------------------*/
225 /*! \name Fields */
226 /*! \{ */
228 SFUnrecGeometryPtr _sfGeometry;
229 SFInt32 _sfMaxDepth;
230 MFIntersectKDTreeNode _mfTreeNodes;
231 MFUInt32 _mfTriIndices;
233 /*! \} */
234 /*---------------------------------------------------------------------*/
235 /*! \name Constructors */
236 /*! \{ */
238 KDTreeIntersectProxyAttachmentBase(void);
239 KDTreeIntersectProxyAttachmentBase(const KDTreeIntersectProxyAttachmentBase &source);
241 /*! \} */
242 /*---------------------------------------------------------------------*/
243 /*! \name Destructors */
244 /*! \{ */
246 virtual ~KDTreeIntersectProxyAttachmentBase(void);
248 /*! \} */
249 /*---------------------------------------------------------------------*/
250 /*! \name onCreate */
251 /*! \{ */
253 void onCreate(const KDTreeIntersectProxyAttachment *source = NULL);
255 /*! \} */
256 /*---------------------------------------------------------------------*/
257 /*! \name Generic Field Access */
258 /*! \{ */
260 GetFieldHandlePtr getHandleGeometry (void) const;
261 EditFieldHandlePtr editHandleGeometry (void);
262 GetFieldHandlePtr getHandleMaxDepth (void) const;
263 EditFieldHandlePtr editHandleMaxDepth (void);
264 GetFieldHandlePtr getHandleTreeNodes (void) const;
265 EditFieldHandlePtr editHandleTreeNodes (void);
266 GetFieldHandlePtr getHandleTriIndices (void) const;
267 EditFieldHandlePtr editHandleTriIndices (void);
269 /*! \} */
270 /*---------------------------------------------------------------------*/
271 /*! \name Field Get */
272 /*! \{ */
275 MFIntersectKDTreeNode *editMFTreeNodes (void);
276 const MFIntersectKDTreeNode *getMFTreeNodes (void) const;
278 MFUInt32 *editMFTriIndices (void);
279 const MFUInt32 *getMFTriIndices (void) const;
282 MFIntersectKDTreeNode::reference editTreeNodes (const UInt32 index);
283 const IntersectKDTreeNode &getTreeNodes (const UInt32 index) const;
285 MFUInt32 ::reference editTriIndices (const UInt32 index);
286 UInt32 getTriIndices (const UInt32 index) const;
288 /*! \} */
289 /*---------------------------------------------------------------------*/
290 /*! \name Field Set */
291 /*! \{ */
294 /*! \} */
295 /*---------------------------------------------------------------------*/
296 /*! \name Ptr MField Set */
297 /*! \{ */
299 /*! \} */
300 /*---------------------------------------------------------------------*/
301 /*! \name Sync */
302 /*! \{ */
304 #ifdef OSG_MT_CPTR_ASPECT
305 virtual void execSyncV( FieldContainer &oFrom,
306 ConstFieldMaskArg whichField,
307 AspectOffsetStore &oOffsets,
308 ConstFieldMaskArg syncMode ,
309 const UInt32 uiSyncInfo);
311 void execSync ( KDTreeIntersectProxyAttachmentBase *pFrom,
312 ConstFieldMaskArg whichField,
313 AspectOffsetStore &oOffsets,
314 ConstFieldMaskArg syncMode ,
315 const UInt32 uiSyncInfo);
316 #endif
318 /*! \} */
319 /*---------------------------------------------------------------------*/
320 /*! \name Edit */
321 /*! \{ */
323 /*! \} */
324 /*---------------------------------------------------------------------*/
325 /*! \name Aspect Create */
326 /*! \{ */
328 #ifdef OSG_MT_CPTR_ASPECT
329 virtual FieldContainer *createAspectCopy(
330 const FieldContainer *pRefAspect) const;
331 #endif
333 /*! \} */
334 /*---------------------------------------------------------------------*/
335 /*! \name Edit */
336 /*! \{ */
337 /*! \} */
338 /*---------------------------------------------------------------------*/
339 /*! \name Sync */
340 /*! \{ */
342 virtual void resolveLinks(void);
344 /*! \} */
345 /*========================== PRIVATE ================================*/
347 private:
348 /*---------------------------------------------------------------------*/
350 // prohibit default functions (move to 'public' if you need one)
351 void operator =(const KDTreeIntersectProxyAttachmentBase &source);
354 typedef KDTreeIntersectProxyAttachmentBase *KDTreeIntersectProxyAttachmentBaseP;
356 OSG_END_NAMESPACE
358 #endif /* _OSGKDTREEINTERSECTPROXYATTACHMENTBASE_H_ */