1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2013 by the OpenSG Forum *
7 * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net *
9 \*---------------------------------------------------------------------------*/
10 /*---------------------------------------------------------------------------*\
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. *
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. *
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. *
26 \*---------------------------------------------------------------------------*/
27 /*---------------------------------------------------------------------------*\
35 \*---------------------------------------------------------------------------*/
37 /*****************************************************************************\
38 *****************************************************************************
40 ** This file is automatically generated. **
42 ** Any changes made to this file WILL be lost when it is **
43 ** regenerated, which can become necessary at any time. **
45 ** Do not change this file, changes should be done in the derived **
48 *****************************************************************************
49 \*****************************************************************************/
55 //! access the type of the class
57 OSG::FieldContainerType &ManipulatorBase::getClassType(void)
62 //! access the numerical type of the class
64 OSG::UInt32 ManipulatorBase::getClassTypeId(void)
70 OSG::UInt16 ManipulatorBase::getClassGroupId(void)
72 return _type.getGroupId();
75 /*------------------------------ get -----------------------------------*/
77 //! Get the value of the Manipulator::_sfEnablePivot field.
80 bool &ManipulatorBase::editEnablePivot(void)
82 editSField(EnablePivotFieldMask);
84 return _sfEnablePivot.getValue();
87 //! Get the value of the Manipulator::_sfEnablePivot field.
89 bool ManipulatorBase::getEnablePivot(void) const
91 return _sfEnablePivot.getValue();
94 //! Set the value of the Manipulator::_sfEnablePivot field.
96 void ManipulatorBase::setEnablePivot(const bool value)
98 editSField(EnablePivotFieldMask);
100 _sfEnablePivot.setValue(value);
102 //! Get the value of the Manipulator::_sfLastMousePos field.
105 Pnt2f &ManipulatorBase::editLastMousePos(void)
107 editSField(LastMousePosFieldMask);
109 return _sfLastMousePos.getValue();
112 //! Get the value of the Manipulator::_sfLastMousePos field.
114 const Pnt2f &ManipulatorBase::getLastMousePos(void) const
116 return _sfLastMousePos.getValue();
119 //! Set the value of the Manipulator::_sfLastMousePos field.
121 void ManipulatorBase::setLastMousePos(const Pnt2f &value)
123 editSField(LastMousePosFieldMask);
125 _sfLastMousePos.setValue(value);
127 //! Get the value of the Manipulator::_sfActive field.
130 bool &ManipulatorBase::editActive(void)
132 editSField(ActiveFieldMask);
134 return _sfActive.getValue();
137 //! Get the value of the Manipulator::_sfActive field.
139 bool ManipulatorBase::getActive(void) const
141 return _sfActive.getValue();
144 //! Set the value of the Manipulator::_sfActive field.
146 void ManipulatorBase::setActive(const bool value)
148 editSField(ActiveFieldMask);
150 _sfActive.setValue(value);
152 //! Get the value of the Manipulator::_sfLength field.
155 Vec3f &ManipulatorBase::editLength(void)
157 editSField(LengthFieldMask);
159 return _sfLength.getValue();
162 //! Get the value of the Manipulator::_sfLength field.
164 const Vec3f &ManipulatorBase::getLength(void) const
166 return _sfLength.getValue();
169 //! Set the value of the Manipulator::_sfLength field.
171 void ManipulatorBase::setLength(const Vec3f &value)
173 editSField(LengthFieldMask);
175 _sfLength.setValue(value);
177 //! Get the value of the Manipulator::_sfPivot field.
180 Pnt3f &ManipulatorBase::editPivot(void)
182 editSField(PivotFieldMask);
184 return _sfPivot.getValue();
187 //! Get the value of the Manipulator::_sfPivot field.
189 const Pnt3f &ManipulatorBase::getPivot(void) const
191 return _sfPivot.getValue();
194 //! Set the value of the Manipulator::_sfPivot field.
196 void ManipulatorBase::setPivot(const Pnt3f &value)
198 editSField(PivotFieldMask);
200 _sfPivot.setValue(value);
204 #ifdef OSG_MT_CPTR_ASPECT
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);
281 const Char8 *ManipulatorBase::getClassname(void)
283 return "Manipulator";
285 OSG_GEN_CONTAINERPTR(Manipulator);