fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / Dynamics / Skeleton / OSGSkeletonBase.inl
blob5ca79cea2c0efbce6d361dea5982219e6572fb5e
1 /*---------------------------------------------------------------------------*\
2  *                                OpenSG                                     *
3  *                                                                           *
4  *                                                                           *
5  *               Copyright (C) 2000-2013 by the OpenSG Forum                 *
6  *                                                                           *
7  * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net  *
8  *                                                                           *
9 \*---------------------------------------------------------------------------*/
10 /*---------------------------------------------------------------------------*\
11  *                                License                                    *
12  *                                                                           *
13  * This library is free software; you can redistribute it and/or modify it   *
14  * under the terms of the GNU Library General Public License as published    *
15  * by the Free Software Foundation, version 2.                               *
16  *                                                                           *
17  * This library is distributed in the hope that it will be useful, but       *
18  * WITHOUT ANY WARRANTY; without even the implied warranty of                *
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
20  * Library General Public License for more details.                          *
21  *                                                                           *
22  * You should have received a copy of the GNU Library General Public         *
23  * License along with this library; if not, write to the Free Software       *
24  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 *
25  *                                                                           *
26 \*---------------------------------------------------------------------------*/
27 /*---------------------------------------------------------------------------*\
28  *                                Changes                                    *
29  *                                                                           *
30  *                                                                           *
31  *                                                                           *
32  *                                                                           *
33  *                                                                           *
34  *                                                                           *
35 \*---------------------------------------------------------------------------*/
37 /*****************************************************************************\
38  *****************************************************************************
39  **                                                                         **
40  **                  This file is automatically generated.                  **
41  **                                                                         **
42  **          Any changes made to this file WILL be lost when it is          **
43  **           regenerated, which can become necessary at any time.          **
44  **                                                                         **
45  **     Do not change this file, changes should be done in the derived      **
46  **     class Skeleton!
47  **                                                                         **
48  *****************************************************************************
49 \*****************************************************************************/
51 OSG_BEGIN_NAMESPACE
55 //! access the type of the class
56 inline
57 OSG::FieldContainerType &SkeletonBase::getClassType(void)
59     return _type;
62 //! access the numerical type of the class
63 inline
64 OSG::UInt32 SkeletonBase::getClassTypeId(void)
66     return _type.getId();
69 inline
70 OSG::UInt16 SkeletonBase::getClassGroupId(void)
72     return _type.getGroupId();
75 /*------------------------------ get -----------------------------------*/
77 //! Get the value of the Skeleton::_sfUseInvBindMatrix field.
79 inline
80 bool &SkeletonBase::editUseInvBindMatrix(void)
82     editSField(UseInvBindMatrixFieldMask);
84     return _sfUseInvBindMatrix.getValue();
87 //! Get the value of the Skeleton::_sfUseInvBindMatrix field.
88 inline
89       bool  SkeletonBase::getUseInvBindMatrix(void) const
91     return _sfUseInvBindMatrix.getValue();
94 //! Set the value of the Skeleton::_sfUseInvBindMatrix field.
95 inline
96 void SkeletonBase::setUseInvBindMatrix(const bool value)
98     editSField(UseInvBindMatrixFieldMask);
100     _sfUseInvBindMatrix.setValue(value);
102 //! Get the value of the Skeleton::_sfCalcNormalMatrices field.
104 inline
105 bool &SkeletonBase::editCalcNormalMatrices(void)
107     editSField(CalcNormalMatricesFieldMask);
109     return _sfCalcNormalMatrices.getValue();
112 //! Get the value of the Skeleton::_sfCalcNormalMatrices field.
113 inline
114       bool  SkeletonBase::getCalcNormalMatrices(void) const
116     return _sfCalcNormalMatrices.getValue();
119 //! Set the value of the Skeleton::_sfCalcNormalMatrices field.
120 inline
121 void SkeletonBase::setCalcNormalMatrices(const bool value)
123     editSField(CalcNormalMatricesFieldMask);
125     _sfCalcNormalMatrices.setValue(value);
127 //! Get the value of the Skeleton::_sfJointsChanged field.
129 inline
130 OSGAny &SkeletonBase::editJointsChanged(void)
132     editSField(JointsChangedFieldMask);
134     return _sfJointsChanged.getValue();
137 //! Get the value of the Skeleton::_sfJointsChanged field.
138 inline
139 const OSGAny &SkeletonBase::getJointsChanged(void) const
141     return _sfJointsChanged.getValue();
144 //! Set the value of the Skeleton::_sfJointsChanged field.
145 inline
146 void SkeletonBase::setJointsChanged(const OSGAny &value)
148     editSField(JointsChangedFieldMask);
150     _sfJointsChanged.setValue(value);
156 //! Get the value of the \a index element the Skeleton::_mfJointMatrices field.
157 inline
158 const Matrix &SkeletonBase::getJointMatrices(const UInt32 index) const
160     return _mfJointMatrices[index];
163 inline
164 MFMatrix           ::reference SkeletonBase::editJointMatrices(const UInt32 index)
166     editMField(JointMatricesFieldMask, _mfJointMatrices);
168     return _mfJointMatrices[index];
171 //! Get the value of the \a index element the Skeleton::_mfJointNormalMatrices field.
172 inline
173 const Matrix &SkeletonBase::getJointNormalMatrices(const UInt32 index) const
175     return _mfJointNormalMatrices[index];
178 inline
179 MFMatrix           ::reference SkeletonBase::editJointNormalMatrices(const UInt32 index)
181     editMField(JointNormalMatricesFieldMask, _mfJointNormalMatrices);
183     return _mfJointNormalMatrices[index];
187 #ifdef OSG_MT_CPTR_ASPECT
188 inline
189 void SkeletonBase::execSync (      SkeletonBase *pFrom,
190                                         ConstFieldMaskArg  whichField,
191                                         AspectOffsetStore &oOffsets,
192                                         ConstFieldMaskArg  syncMode,
193                                   const UInt32             uiSyncInfo)
195     Inherited::execSync(pFrom, whichField, oOffsets, syncMode, uiSyncInfo);
197     if(FieldBits::NoField != (RootsFieldMask & whichField))
198         _mfRoots.syncWith(pFrom->_mfRoots,
199                                 syncMode,
200                                 uiSyncInfo,
201                                 oOffsets);
203     if(FieldBits::NoField != (JointsFieldMask & whichField))
204         _mfJoints.syncWith(pFrom->_mfJoints,
205                                 syncMode,
206                                 uiSyncInfo,
207                                 oOffsets);
209     if(FieldBits::NoField != (ParentJointsFieldMask & whichField))
210         _mfParentJoints.syncWith(pFrom->_mfParentJoints,
211                                 syncMode,
212                                 uiSyncInfo,
213                                 oOffsets);
215     if(FieldBits::NoField != (JointMatricesFieldMask & whichField))
216         _mfJointMatrices.syncWith(pFrom->_mfJointMatrices,
217                                 syncMode,
218                                 uiSyncInfo,
219                                 oOffsets);
221     if(FieldBits::NoField != (JointNormalMatricesFieldMask & whichField))
222         _mfJointNormalMatrices.syncWith(pFrom->_mfJointNormalMatrices,
223                                 syncMode,
224                                 uiSyncInfo,
225                                 oOffsets);
227     if(FieldBits::NoField != (UseInvBindMatrixFieldMask & whichField))
228         _sfUseInvBindMatrix.syncWith(pFrom->_sfUseInvBindMatrix);
230     if(FieldBits::NoField != (CalcNormalMatricesFieldMask & whichField))
231         _sfCalcNormalMatrices.syncWith(pFrom->_sfCalcNormalMatrices);
233     if(FieldBits::NoField != (JointsChangedFieldMask & whichField))
234         _sfJointsChanged.syncWith(pFrom->_sfJointsChanged);
236 #endif
239 inline
240 const Char8 *SkeletonBase::getClassname(void)
242     return "Skeleton";
244 OSG_GEN_CONTAINERPTR(Skeleton);
246 OSG_END_NAMESPACE