changed: gcc8 base update
[opensg.git] / Source / Contrib / Manipulators / OSGManipulatorBase.inl
blobb367a26de878b714dfb8244765f2252c4a46e1b4
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 Manipulator!
47  **                                                                         **
48  *****************************************************************************
49 \*****************************************************************************/
51 OSG_BEGIN_NAMESPACE
55 //! access the type of the class
56 inline
57 OSG::FieldContainerType &ManipulatorBase::getClassType(void)
59     return _type;
62 //! access the numerical type of the class
63 inline
64 OSG::UInt32 ManipulatorBase::getClassTypeId(void)
66     return _type.getId();
69 inline
70 OSG::UInt16 ManipulatorBase::getClassGroupId(void)
72     return _type.getGroupId();
75 /*------------------------------ get -----------------------------------*/
77 //! Get the value of the Manipulator::_sfEnablePivot field.
79 inline
80 bool &ManipulatorBase::editEnablePivot(void)
82     editSField(EnablePivotFieldMask);
84     return _sfEnablePivot.getValue();
87 //! Get the value of the Manipulator::_sfEnablePivot field.
88 inline
89       bool  ManipulatorBase::getEnablePivot(void) const
91     return _sfEnablePivot.getValue();
94 //! Set the value of the Manipulator::_sfEnablePivot field.
95 inline
96 void ManipulatorBase::setEnablePivot(const bool value)
98     editSField(EnablePivotFieldMask);
100     _sfEnablePivot.setValue(value);
102 //! Get the value of the Manipulator::_sfLastMousePos field.
104 inline
105 Pnt2f &ManipulatorBase::editLastMousePos(void)
107     editSField(LastMousePosFieldMask);
109     return _sfLastMousePos.getValue();
112 //! Get the value of the Manipulator::_sfLastMousePos field.
113 inline
114 const Pnt2f &ManipulatorBase::getLastMousePos(void) const
116     return _sfLastMousePos.getValue();
119 //! Set the value of the Manipulator::_sfLastMousePos field.
120 inline
121 void ManipulatorBase::setLastMousePos(const Pnt2f &value)
123     editSField(LastMousePosFieldMask);
125     _sfLastMousePos.setValue(value);
127 //! Get the value of the Manipulator::_sfActive field.
129 inline
130 bool &ManipulatorBase::editActive(void)
132     editSField(ActiveFieldMask);
134     return _sfActive.getValue();
137 //! Get the value of the Manipulator::_sfActive field.
138 inline
139       bool  ManipulatorBase::getActive(void) const
141     return _sfActive.getValue();
144 //! Set the value of the Manipulator::_sfActive field.
145 inline
146 void ManipulatorBase::setActive(const bool value)
148     editSField(ActiveFieldMask);
150     _sfActive.setValue(value);
152 //! Get the value of the Manipulator::_sfLength field.
154 inline
155 Vec3f &ManipulatorBase::editLength(void)
157     editSField(LengthFieldMask);
159     return _sfLength.getValue();
162 //! Get the value of the Manipulator::_sfLength field.
163 inline
164 const Vec3f &ManipulatorBase::getLength(void) const
166     return _sfLength.getValue();
169 //! Set the value of the Manipulator::_sfLength field.
170 inline
171 void ManipulatorBase::setLength(const Vec3f &value)
173     editSField(LengthFieldMask);
175     _sfLength.setValue(value);
177 //! Get the value of the Manipulator::_sfPivot field.
179 inline
180 Pnt3f &ManipulatorBase::editPivot(void)
182     editSField(PivotFieldMask);
184     return _sfPivot.getValue();
187 //! Get the value of the Manipulator::_sfPivot field.
188 inline
189 const Pnt3f &ManipulatorBase::getPivot(void) const
191     return _sfPivot.getValue();
194 //! Set the value of the Manipulator::_sfPivot field.
195 inline
196 void ManipulatorBase::setPivot(const Pnt3f &value)
198     editSField(PivotFieldMask);
200     _sfPivot.setValue(value);
204 #ifdef OSG_MT_CPTR_ASPECT
205 inline
206 void ManipulatorBase::execSync (      ManipulatorBase *pFrom,
207                                         ConstFieldMaskArg  whichField,
208                                         AspectOffsetStore &oOffsets,
209                                         ConstFieldMaskArg  syncMode,
210                                   const UInt32             uiSyncInfo)
212     Inherited::execSync(pFrom, whichField, oOffsets, syncMode, uiSyncInfo);
214     if(FieldBits::NoField != (TargetFieldMask & whichField))
215         _sfTarget.syncWith(pFrom->_sfTarget);
217     if(FieldBits::NoField != (EnablePivotFieldMask & whichField))
218         _sfEnablePivot.syncWith(pFrom->_sfEnablePivot);
220     if(FieldBits::NoField != (ActiveSubHandleFieldMask & whichField))
221         _sfActiveSubHandle.syncWith(pFrom->_sfActiveSubHandle);
223     if(FieldBits::NoField != (LastMousePosFieldMask & whichField))
224         _sfLastMousePos.syncWith(pFrom->_sfLastMousePos);
226     if(FieldBits::NoField != (ViewportFieldMask & whichField))
227         _sfViewport.syncWith(pFrom->_sfViewport);
229     if(FieldBits::NoField != (ActiveFieldMask & whichField))
230         _sfActive.syncWith(pFrom->_sfActive);
232     if(FieldBits::NoField != (LengthFieldMask & whichField))
233         _sfLength.syncWith(pFrom->_sfLength);
235     if(FieldBits::NoField != (PivotFieldMask & whichField))
236         _sfPivot.syncWith(pFrom->_sfPivot);
238     if(FieldBits::NoField != (HandleXNodeFieldMask & whichField))
239         _sfHandleXNode.syncWith(pFrom->_sfHandleXNode);
241     if(FieldBits::NoField != (HandleYNodeFieldMask & whichField))
242         _sfHandleYNode.syncWith(pFrom->_sfHandleYNode);
244     if(FieldBits::NoField != (HandleZNodeFieldMask & whichField))
245         _sfHandleZNode.syncWith(pFrom->_sfHandleZNode);
247     if(FieldBits::NoField != (HandlePNodeFieldMask & whichField))
248         _sfHandlePNode.syncWith(pFrom->_sfHandlePNode);
250     if(FieldBits::NoField != (TransXNodeFieldMask & whichField))
251         _sfTransXNode.syncWith(pFrom->_sfTransXNode);
253     if(FieldBits::NoField != (TransYNodeFieldMask & whichField))
254         _sfTransYNode.syncWith(pFrom->_sfTransYNode);
256     if(FieldBits::NoField != (TransZNodeFieldMask & whichField))
257         _sfTransZNode.syncWith(pFrom->_sfTransZNode);
259     if(FieldBits::NoField != (PivotNodeFieldMask & whichField))
260         _sfPivotNode.syncWith(pFrom->_sfPivotNode);
262     if(FieldBits::NoField != (MaterialXFieldMask & whichField))
263         _sfMaterialX.syncWith(pFrom->_sfMaterialX);
265     if(FieldBits::NoField != (MaterialYFieldMask & whichField))
266         _sfMaterialY.syncWith(pFrom->_sfMaterialY);
268     if(FieldBits::NoField != (MaterialZFieldMask & whichField))
269         _sfMaterialZ.syncWith(pFrom->_sfMaterialZ);
271     if(FieldBits::NoField != (MaterialPivotFieldMask & whichField))
272         _sfMaterialPivot.syncWith(pFrom->_sfMaterialPivot);
274     if(FieldBits::NoField != (AxisLinesNFieldMask & whichField))
275         _sfAxisLinesN.syncWith(pFrom->_sfAxisLinesN);
277 #endif
280 inline
281 const Char8 *ManipulatorBase::getClassname(void)
283     return "Manipulator";
285 OSG_GEN_CONTAINERPTR(Manipulator);
287 OSG_END_NAMESPACE