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 ClipPlaneChunk
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGCLIPPLANECHUNKBASE_H_
55 #define _OSGCLIPPLANECHUNKBASE_H_
61 #include "OSGConfig.h"
62 #include "OSGStateDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGStateChunk.h" // Parent
68 #include "OSGVecFields.h" // Equation type
69 #include "OSGSysFields.h" // Enable type
70 #include "OSGNodeFields.h" // Beacon type
72 #include "OSGClipPlaneChunkFields.h"
79 //! \brief ClipPlaneChunk Base Class.
81 class OSG_STATE_DLLMAPPING ClipPlaneChunkBase
: public StateChunk
85 typedef StateChunk Inherited
;
86 typedef StateChunk ParentContainer
;
88 typedef Inherited::TypeObject TypeObject
;
89 typedef TypeObject::InitPhase InitPhase
;
91 OSG_GEN_INTERNALPTR(ClipPlaneChunk
);
93 /*========================== PUBLIC =================================*/
99 EquationFieldId
= Inherited::NextFieldId
,
100 EnableFieldId
= EquationFieldId
+ 1,
101 BeaconFieldId
= EnableFieldId
+ 1,
102 NextFieldId
= BeaconFieldId
+ 1
105 static const OSG::BitVector EquationFieldMask
=
106 (TypeTraits
<BitVector
>::One
<< EquationFieldId
);
107 static const OSG::BitVector EnableFieldMask
=
108 (TypeTraits
<BitVector
>::One
<< EnableFieldId
);
109 static const OSG::BitVector BeaconFieldMask
=
110 (TypeTraits
<BitVector
>::One
<< BeaconFieldId
);
111 static const OSG::BitVector NextFieldMask
=
112 (TypeTraits
<BitVector
>::One
<< NextFieldId
);
114 typedef SFVec4f SFEquationType
;
115 typedef SFBool SFEnableType
;
116 typedef SFWeakNodePtr SFBeaconType
;
118 /*---------------------------------------------------------------------*/
119 /*! \name Class Get */
122 static FieldContainerType
&getClassType (void);
123 static UInt32
getClassTypeId (void);
124 static UInt16
getClassGroupId(void);
127 /*---------------------------------------------------------------------*/
128 /*! \name FieldContainer Get */
131 virtual FieldContainerType
&getType (void);
132 virtual const FieldContainerType
&getType (void) const;
134 virtual UInt32
getContainerSize(void) const;
137 /*---------------------------------------------------------------------*/
138 /*! \name Field Get */
142 SFVec4f
*editSFEquation (void);
143 const SFVec4f
*getSFEquation (void) const;
145 SFBool
*editSFEnable (void);
146 const SFBool
*getSFEnable (void) const;
147 const SFWeakNodePtr
*getSFBeacon (void) const;
148 SFWeakNodePtr
*editSFBeacon (void);
151 Vec4f
&editEquation (void);
152 const Vec4f
&getEquation (void) const;
154 bool &editEnable (void);
155 bool getEnable (void) const;
157 Node
* getBeacon (void) const;
160 /*---------------------------------------------------------------------*/
161 /*! \name Field Set */
164 void setEquation (const Vec4f
&value
);
165 void setEnable (const bool value
);
166 void setBeacon (Node
* const value
);
169 /*---------------------------------------------------------------------*/
170 /*! \name Ptr Field Set */
174 /*---------------------------------------------------------------------*/
175 /*! \name Ptr MField Set */
179 /*---------------------------------------------------------------------*/
180 /*! \name Binary Access */
183 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
184 virtual void copyToBin (BinaryDataHandler
&pMem
,
185 ConstFieldMaskArg whichField
);
186 virtual void copyFromBin(BinaryDataHandler
&pMem
,
187 ConstFieldMaskArg whichField
);
191 /*---------------------------------------------------------------------*/
192 /*! \name Construction */
195 static ClipPlaneChunkTransitPtr
create (void);
196 static ClipPlaneChunk
*createEmpty (void);
198 static ClipPlaneChunkTransitPtr
createLocal (
199 BitVector bFlags
= FCLocal::All
);
201 static ClipPlaneChunk
*createEmptyLocal(
202 BitVector bFlags
= FCLocal::All
);
204 static ClipPlaneChunkTransitPtr
createDependent (BitVector bFlags
);
207 /*---------------------------------------------------------------------*/
211 virtual FieldContainerTransitPtr
shallowCopy (void) const;
212 virtual FieldContainerTransitPtr
shallowCopyLocal(
213 BitVector bFlags
= FCLocal::All
) const;
214 virtual FieldContainerTransitPtr
shallowCopyDependent(
215 BitVector bFlags
) const;
218 /*========================= PROTECTED ===============================*/
222 static TypeObject _type
;
224 static void classDescInserter(TypeObject
&oType
);
225 static const Char8
*getClassname (void );
227 /*---------------------------------------------------------------------*/
233 SFWeakNodePtr _sfBeacon
;
236 /*---------------------------------------------------------------------*/
237 /*! \name Constructors */
240 ClipPlaneChunkBase(void);
241 ClipPlaneChunkBase(const ClipPlaneChunkBase
&source
);
244 /*---------------------------------------------------------------------*/
245 /*! \name Destructors */
248 virtual ~ClipPlaneChunkBase(void);
251 /*---------------------------------------------------------------------*/
252 /*! \name onCreate */
255 void onCreate(const ClipPlaneChunk
*source
= NULL
);
258 /*---------------------------------------------------------------------*/
259 /*! \name Generic Field Access */
262 GetFieldHandlePtr
getHandleEquation (void) const;
263 EditFieldHandlePtr
editHandleEquation (void);
264 GetFieldHandlePtr
getHandleEnable (void) const;
265 EditFieldHandlePtr
editHandleEnable (void);
266 GetFieldHandlePtr
getHandleBeacon (void) const;
267 EditFieldHandlePtr
editHandleBeacon (void);
270 /*---------------------------------------------------------------------*/
274 #ifdef OSG_MT_CPTR_ASPECT
275 virtual void execSyncV( FieldContainer
&oFrom
,
276 ConstFieldMaskArg whichField
,
277 AspectOffsetStore
&oOffsets
,
278 ConstFieldMaskArg syncMode
,
279 const UInt32 uiSyncInfo
);
281 void execSync ( ClipPlaneChunkBase
*pFrom
,
282 ConstFieldMaskArg whichField
,
283 AspectOffsetStore
&oOffsets
,
284 ConstFieldMaskArg syncMode
,
285 const UInt32 uiSyncInfo
);
289 /*---------------------------------------------------------------------*/
294 /*---------------------------------------------------------------------*/
295 /*! \name Aspect Create */
298 #ifdef OSG_MT_CPTR_ASPECT
299 virtual FieldContainer
*createAspectCopy(
300 const FieldContainer
*pRefAspect
) const;
304 /*---------------------------------------------------------------------*/
308 /*---------------------------------------------------------------------*/
312 virtual void resolveLinks(void);
315 /*========================== PRIVATE ================================*/
318 /*---------------------------------------------------------------------*/
320 // prohibit default functions (move to 'public' if you need one)
321 void operator =(const ClipPlaneChunkBase
&source
);
324 typedef ClipPlaneChunkBase
*ClipPlaneChunkBaseP
;
328 #endif /* _OSGCLIPPLANECHUNKBASE_H_ */