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 UnskinnedSkinningAlgorithm!
50 *****************************************************************************
51 \*****************************************************************************/
57 #pragma warning(disable: 4355) // turn off 'this' : used in base member initializer list warning
58 #pragma warning(disable: 4290) // disable exception specification warning
61 #include "OSGConfig.h"
66 #include "OSGUnskinnedSkinningAlgorithmBase.h"
67 #include "OSGUnskinnedSkinningAlgorithm.h"
69 #include <boost/bind.hpp>
73 /***************************************************************************\
75 \***************************************************************************/
77 /*! \class OSG::UnskinnedSkinningAlgorithm
81 /***************************************************************************\
82 * Field Documentation *
83 \***************************************************************************/
86 /***************************************************************************\
87 * FieldType/FieldTrait Instantiation *
88 \***************************************************************************/
90 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
91 PointerType FieldTraits
<UnskinnedSkinningAlgorithm
*, nsOSG
>::_type(
92 "UnskinnedSkinningAlgorithmPtr",
93 "SkinningAlgorithmPtr",
94 UnskinnedSkinningAlgorithm::getClassType(),
98 OSG_FIELDTRAITS_GETTYPE_NS(UnskinnedSkinningAlgorithm
*, nsOSG
)
100 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField
,
101 UnskinnedSkinningAlgorithm
*,
104 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField
,
105 UnskinnedSkinningAlgorithm
*,
108 /***************************************************************************\
109 * Field Description *
110 \***************************************************************************/
112 void UnskinnedSkinningAlgorithmBase::classDescInserter(TypeObject
&oType
)
117 UnskinnedSkinningAlgorithmBase::TypeObject
UnskinnedSkinningAlgorithmBase::_type(
118 UnskinnedSkinningAlgorithmBase::getClassname(),
119 Inherited::getClassname(),
122 reinterpret_cast<PrototypeCreateF
>(&UnskinnedSkinningAlgorithmBase::createEmptyLocal
),
123 reinterpret_cast<InitContainerF
>(&UnskinnedSkinningAlgorithm::initMethod
),
124 reinterpret_cast<ExitContainerF
>(&UnskinnedSkinningAlgorithm::exitMethod
),
125 reinterpret_cast<InitalInsertDescFunc
>(
126 reinterpret_cast<void *>(&UnskinnedSkinningAlgorithm::classDescInserter
)),
129 "<?xml version=\"1.0\"?>\n"
132 " name=\"UnskinnedSkinningAlgorithm\"\n"
133 " parent=\"SkinningAlgorithm\"\n"
134 " library=\"Dynamics\"\n"
135 " pointerfieldtypes=\"both\"\n"
136 " structure=\"concrete\"\n"
137 " systemcomponent=\"true\"\n"
138 " parentsystemcomponent=\"true\"\n"
139 " decoratable=\"false\"\n"
140 " childFields=\"none\"\n"
141 " parentFields=\"none\"\n"
143 "</FieldContainer>\n",
147 /*------------------------------ get -----------------------------------*/
149 FieldContainerType
&UnskinnedSkinningAlgorithmBase::getType(void)
154 const FieldContainerType
&UnskinnedSkinningAlgorithmBase::getType(void) const
159 UInt32
UnskinnedSkinningAlgorithmBase::getContainerSize(void) const
161 return sizeof(UnskinnedSkinningAlgorithm
);
164 /*------------------------- decorator get ------------------------------*/
171 /*------------------------------ access -----------------------------------*/
173 SizeT
UnskinnedSkinningAlgorithmBase::getBinSize(ConstFieldMaskArg whichField
)
175 SizeT returnValue
= Inherited::getBinSize(whichField
);
181 void UnskinnedSkinningAlgorithmBase::copyToBin(BinaryDataHandler
&pMem
,
182 ConstFieldMaskArg whichField
)
184 Inherited::copyToBin(pMem
, whichField
);
188 void UnskinnedSkinningAlgorithmBase::copyFromBin(BinaryDataHandler
&pMem
,
189 ConstFieldMaskArg whichField
)
191 Inherited::copyFromBin(pMem
, whichField
);
195 //! create a new instance of the class
196 UnskinnedSkinningAlgorithmTransitPtr
UnskinnedSkinningAlgorithmBase::createLocal(BitVector bFlags
)
198 UnskinnedSkinningAlgorithmTransitPtr fc
;
200 if(getClassType().getPrototype() != NULL
)
202 FieldContainerTransitPtr tmpPtr
=
203 getClassType().getPrototype()-> shallowCopyLocal(bFlags
);
205 fc
= dynamic_pointer_cast
<UnskinnedSkinningAlgorithm
>(tmpPtr
);
211 //! create a new instance of the class, copy the container flags
212 UnskinnedSkinningAlgorithmTransitPtr
UnskinnedSkinningAlgorithmBase::createDependent(BitVector bFlags
)
214 UnskinnedSkinningAlgorithmTransitPtr fc
;
216 if(getClassType().getPrototype() != NULL
)
218 FieldContainerTransitPtr tmpPtr
=
219 getClassType().getPrototype()-> shallowCopyDependent(bFlags
);
221 fc
= dynamic_pointer_cast
<UnskinnedSkinningAlgorithm
>(tmpPtr
);
227 //! create a new instance of the class
228 UnskinnedSkinningAlgorithmTransitPtr
UnskinnedSkinningAlgorithmBase::create(void)
230 UnskinnedSkinningAlgorithmTransitPtr fc
;
232 if(getClassType().getPrototype() != NULL
)
234 FieldContainerTransitPtr tmpPtr
=
235 getClassType().getPrototype()-> shallowCopy();
237 fc
= dynamic_pointer_cast
<UnskinnedSkinningAlgorithm
>(tmpPtr
);
243 UnskinnedSkinningAlgorithm
*UnskinnedSkinningAlgorithmBase::createEmptyLocal(BitVector bFlags
)
245 UnskinnedSkinningAlgorithm
*returnValue
;
247 newPtr
<UnskinnedSkinningAlgorithm
>(returnValue
, bFlags
);
249 returnValue
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
254 //! create an empty new instance of the class, do not copy the prototype
255 UnskinnedSkinningAlgorithm
*UnskinnedSkinningAlgorithmBase::createEmpty(void)
257 UnskinnedSkinningAlgorithm
*returnValue
;
259 newPtr
<UnskinnedSkinningAlgorithm
>(returnValue
, Thread::getCurrentLocalFlags());
261 returnValue
->_pFieldFlags
->_bNamespaceMask
&=
262 ~Thread::getCurrentLocalFlags();
268 FieldContainerTransitPtr
UnskinnedSkinningAlgorithmBase::shallowCopyLocal(
269 BitVector bFlags
) const
271 UnskinnedSkinningAlgorithm
*tmpPtr
;
273 newPtr(tmpPtr
, dynamic_cast<const UnskinnedSkinningAlgorithm
*>(this), bFlags
);
275 FieldContainerTransitPtr
returnValue(tmpPtr
);
277 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
282 FieldContainerTransitPtr
UnskinnedSkinningAlgorithmBase::shallowCopyDependent(
283 BitVector bFlags
) const
285 UnskinnedSkinningAlgorithm
*tmpPtr
;
287 newPtr(tmpPtr
, dynamic_cast<const UnskinnedSkinningAlgorithm
*>(this), ~bFlags
);
289 FieldContainerTransitPtr
returnValue(tmpPtr
);
291 tmpPtr
->_pFieldFlags
->_bNamespaceMask
= bFlags
;
296 FieldContainerTransitPtr
UnskinnedSkinningAlgorithmBase::shallowCopy(void) const
298 UnskinnedSkinningAlgorithm
*tmpPtr
;
301 dynamic_cast<const UnskinnedSkinningAlgorithm
*>(this),
302 Thread::getCurrentLocalFlags());
304 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~Thread::getCurrentLocalFlags();
306 FieldContainerTransitPtr
returnValue(tmpPtr
);
314 /*------------------------- constructors ----------------------------------*/
316 UnskinnedSkinningAlgorithmBase::UnskinnedSkinningAlgorithmBase(void) :
321 UnskinnedSkinningAlgorithmBase::UnskinnedSkinningAlgorithmBase(const UnskinnedSkinningAlgorithmBase
&source
) :
327 /*-------------------------- destructors ----------------------------------*/
329 UnskinnedSkinningAlgorithmBase::~UnskinnedSkinningAlgorithmBase(void)
335 #ifdef OSG_MT_CPTR_ASPECT
336 void UnskinnedSkinningAlgorithmBase::execSyncV( FieldContainer
&oFrom
,
337 ConstFieldMaskArg whichField
,
338 AspectOffsetStore
&oOffsets
,
339 ConstFieldMaskArg syncMode
,
340 const UInt32 uiSyncInfo
)
342 UnskinnedSkinningAlgorithm
*pThis
= static_cast<UnskinnedSkinningAlgorithm
*>(this);
344 pThis
->execSync(static_cast<UnskinnedSkinningAlgorithm
*>(&oFrom
),
353 #ifdef OSG_MT_CPTR_ASPECT
354 FieldContainer
*UnskinnedSkinningAlgorithmBase::createAspectCopy(
355 const FieldContainer
*pRefAspect
) const
357 UnskinnedSkinningAlgorithm
*returnValue
;
359 newAspectCopy(returnValue
,
360 dynamic_cast<const UnskinnedSkinningAlgorithm
*>(pRefAspect
),
361 dynamic_cast<const UnskinnedSkinningAlgorithm
*>(this));
367 void UnskinnedSkinningAlgorithmBase::resolveLinks(void)
369 Inherited::resolveLinks();