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 KDTreeIntersectProxyAttachment
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGKDTREEINTERSECTPROXYATTACHMENTBASE_H_
55 #define _OSGKDTREEINTERSECTPROXYATTACHMENTBASE_H_
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"
77 class KDTreeIntersectProxyAttachment
;
79 //! \brief KDTreeIntersectProxyAttachment Base Class.
81 class OSG_DRAWABLE_DLLMAPPING KDTreeIntersectProxyAttachmentBase
: public IntersectProxyAttachment
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 =================================*/
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 */
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 Field Get */
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;
158 /*---------------------------------------------------------------------*/
159 /*! \name Field Set */
162 void setGeometry (Geometry
* const value
);
163 void setMaxDepth (const Int32 value
);
166 /*---------------------------------------------------------------------*/
167 /*! \name Ptr Field Set */
171 /*---------------------------------------------------------------------*/
172 /*! \name Ptr MField Set */
176 /*---------------------------------------------------------------------*/
177 /*! \name Binary Access */
180 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
181 virtual void copyToBin (BinaryDataHandler
&pMem
,
182 ConstFieldMaskArg whichField
);
183 virtual void copyFromBin(BinaryDataHandler
&pMem
,
184 ConstFieldMaskArg whichField
);
188 /*---------------------------------------------------------------------*/
189 /*! \name Construction */
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
);
204 /*---------------------------------------------------------------------*/
208 virtual FieldContainerTransitPtr
shallowCopy (void) const;
209 virtual FieldContainerTransitPtr
shallowCopyLocal(
210 BitVector bFlags
= FCLocal::All
) const;
211 virtual FieldContainerTransitPtr
shallowCopyDependent(
212 BitVector bFlags
) const;
215 /*========================= PROTECTED ===============================*/
219 static TypeObject _type
;
221 static void classDescInserter(TypeObject
&oType
);
222 static const Char8
*getClassname (void );
224 /*---------------------------------------------------------------------*/
228 SFUnrecGeometryPtr _sfGeometry
;
230 MFIntersectKDTreeNode _mfTreeNodes
;
231 MFUInt32 _mfTriIndices
;
234 /*---------------------------------------------------------------------*/
235 /*! \name Constructors */
238 KDTreeIntersectProxyAttachmentBase(void);
239 KDTreeIntersectProxyAttachmentBase(const KDTreeIntersectProxyAttachmentBase
&source
);
242 /*---------------------------------------------------------------------*/
243 /*! \name Destructors */
246 virtual ~KDTreeIntersectProxyAttachmentBase(void);
249 /*---------------------------------------------------------------------*/
250 /*! \name onCreate */
253 void onCreate(const KDTreeIntersectProxyAttachment
*source
= NULL
);
256 /*---------------------------------------------------------------------*/
257 /*! \name Generic Field Access */
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);
270 /*---------------------------------------------------------------------*/
271 /*! \name Field Get */
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;
289 /*---------------------------------------------------------------------*/
290 /*! \name Field Set */
295 /*---------------------------------------------------------------------*/
296 /*! \name Ptr MField Set */
300 /*---------------------------------------------------------------------*/
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
);
319 /*---------------------------------------------------------------------*/
324 /*---------------------------------------------------------------------*/
325 /*! \name Aspect Create */
328 #ifdef OSG_MT_CPTR_ASPECT
329 virtual FieldContainer
*createAspectCopy(
330 const FieldContainer
*pRefAspect
) const;
334 /*---------------------------------------------------------------------*/
338 /*---------------------------------------------------------------------*/
342 virtual void resolveLinks(void);
345 /*========================== PRIVATE ================================*/
348 /*---------------------------------------------------------------------*/
350 // prohibit default functions (move to 'public' if you need one)
351 void operator =(const KDTreeIntersectProxyAttachmentBase
&source
);
354 typedef KDTreeIntersectProxyAttachmentBase
*KDTreeIntersectProxyAttachmentBaseP
;
358 #endif /* _OSGKDTREEINTERSECTPROXYATTACHMENTBASE_H_ */