| 1 | /* |
| 2 | * |
| 3 | * Copyright (C) 2000 Silicon Graphics, Inc. All Rights Reserved. |
| 4 | * |
| 5 | * This library is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU Lesser General Public |
| 7 | * License as published by the Free Software Foundation; either |
| 8 | * version 2.1 of the License, or (at your option) any later version. |
| 9 | * |
| 10 | * This library is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | * Lesser General Public License for more details. |
| 14 | * |
| 15 | * Further, this software is distributed without any warranty that it is |
| 16 | * free of the rightful claim of any third person regarding infringement |
| 17 | * or the like. Any license provided herein, whether implied or |
| 18 | * otherwise, applies only to this software file. Patent licenses, if |
| 19 | * any, provided herein do not apply to combinations of this program with |
| 20 | * other software, or any other product whatsoever. |
| 21 | * |
| 22 | * You should have received a copy of the GNU Lesser General Public |
| 23 | * License along with this library; if not, write to the Free Software |
| 24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 25 | * |
| 26 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, |
| 27 | * Mountain View, CA 94043, or: |
| 28 | * |
| 29 | * http://www.sgi.com |
| 30 | * |
| 31 | * For further information regarding this notice, see: |
| 32 | * |
| 33 | * http://oss.sgi.com/projects/GenInfo/NoticeExplan/ |
| 34 | * |
| 35 | */ |
| 36 | |
| 37 | /* |
| 38 | * Copyright (C) 1990,91,92 Silicon Graphics, Inc. |
| 39 | * |
| 40 | _______________________________________________________________________ |
| 41 | ______________ S I L I C O N G R A P H I C S I N C . ____________ |
| 42 | | |
| 43 | | $Revision: 1.1.1.1 $ |
| 44 | | |
| 45 | | Classes: |
| 46 | | SoJackDragger |
| 47 | | |
| 48 | | Author(s): Paul Isaacs, Howard Look |
| 49 | | |
| 50 | ______________ S I L I C O N G R A P H I C S I N C . ____________ |
| 51 | _______________________________________________________________________ |
| 52 | */ |
| 53 | |
| 54 | |
| 55 | #include <cstdio> |
| 56 | #include <Inventor/SbLinear.h>cxx . . $ `<file>/lib/database/include/Inventor/SbLinear.h`/ |
| 57 | #include <Inventor/SoDB.h>cxx . . $ `<file>/lib/database/include/Inventor/SoDB.h`/ |
| 58 | #include <Inventor/sensors/SoFieldSensor.h>cxx . . $ `<file>/lib/database/include/Inventor/sensors/SoFieldSensor.h`/ |
| 59 | |
| 60 | #include <Inventor/nodes/SoSurroundScale.h>cxx . . $ `<file>/lib/interaction/include/Inventor/nodes/SoSurroundScale.h`/ |
| 61 | #include <Inventor/nodes/SoAntiSquish.h>cxx . . $ `<file>/lib/interaction/include/Inventor/nodes/SoAntiSquish.h`/ |
| 62 | #include <Inventor/nodes/SoTransform.h>cxx . . $ `<file>/lib/database/include/Inventor/nodes/SoTransform.h`/ |
| 63 | |
| 64 | #include <Inventor/draggers/SoDragPointDragger.h>cxx . . $ `<file>/lib/interaction/include/Inventor/draggers/SoDragPointDragger.h`/ |
| 65 | #include <Inventor/draggers/SoJackDragger.h>cxx . . $ `<file>/lib/interaction/include/Inventor/draggers/SoJackDragger.h`/ |
| 66 | #include <Inventor/draggers/SoRotateSphericalDragger.h>cxx . . $ `<file>/lib/interaction/include/Inventor/draggers/SoRotateSphericalDragger.h`/ |
| 67 | #include <Inventor/draggers/SoScaleUniformDragger.h>cxx . . $ `<file>/lib/interaction/include/Inventor/draggers/SoScaleUniformDragger.h`/ |
| 68 | |
| 69 | #include "geom/SoJackDraggerGeom.h"cxx . . $ `<file>/lib/interaction/src/draggers/geom/SoJackDraggerGeom.h`/ |
| 70 | |
| 71 | |
| 72 | SO_KIT_SOURCEcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:194:9`!(SoJackDragger); |
| 73 | |
| 74 | |
| 75 | //////////////////////////////////////////////////////////////////////// |
| 76 | // |
| 77 | // Description: |
| 78 | // Constructors. Each constructor calls constructorSub(), which |
| 79 | // does work that is common to each. |
| 80 | // |
| 81 | // Use: public |
| 82 | // |
| 83 | //////////////////////////////////////////////////////////////////////// |
| 84 | |
| 85 | // Default constructor. |
| 86 | SoJackDraggercxx . . $ SoJackDragger#::SoJackDraggercxx . . $ SoJackDragger#SoJackDragger(49f6e7a06ebc5aa8).() |
| 87 | { |
| 88 | SO_KIT_CONSTRUCTORcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:254:9`!(SoJackDragger); |
| 89 | |
| 90 | isBuiltIncxx . . $ SoFieldContainer#isBuiltIn. = TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!; |
| 91 | |
| 92 | // Don't create this by default. It's only really put into use |
| 93 | // if this dragger is put inside a manipulator. |
| 94 | SO_KIT_ADD_CATALOG_ENTRYcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:333:9`!(surroundScale, SoSurroundScale, |
| 95 | TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!, topSeparator, geomSeparator,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!); |
| 96 | // Create an anti-squish node by default. |
| 97 | SO_KIT_ADD_CATALOG_ENTRYcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:333:9`!(antiSquish, SoAntiSquish, |
| 98 | FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`!, topSeparator, geomSeparator,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!); |
| 99 | |
| 100 | SO_KIT_ADD_CATALOG_ENTRYcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:333:9`!(scaler, SoScaleUniformDragger, |
| 101 | TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!, topSeparator, geomSeparator,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!); |
| 102 | SO_KIT_ADD_CATALOG_ENTRYcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:333:9`!(rotator, SoRotateSphericalDragger, |
| 103 | TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!, topSeparator, geomSeparator,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!); |
| 104 | SO_KIT_ADD_CATALOG_ENTRYcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:333:9`!(translator, SoDragPointDragger, |
| 105 | TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!, topSeparator, geomSeparator,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!); |
| 106 | |
| 107 | // Read the default geometry for this dragger |
| 108 | if (SO_KIT_IS_FIRST_INSTANCEcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:258:9`!()) |
| 109 | readDefaultPartscxx . . $ SoInteractionKit#readDefaultParts(5e891a9f77bb0eff).( "jackDragger.iv", geomBuffercxx . . $ SoJackDragger#geomBuffer., sizeof(geomBuffercxx . . $ SoJackDragger#geomBuffer.) ); |
| 110 | |
| 111 | SO_KIT_ADD_FIELDcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:261:9`!(rotation, (0.0, 0.0, 0.0, 1.0)); |
| 112 | SO_KIT_ADD_FIELDcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:261:9`!(translation, (0.0, 0.0, 0.0)); |
| 113 | SO_KIT_ADD_FIELDcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:261:9`!(scaleFactor, (1.0, 1.0, 1.0)); |
| 114 | |
| 115 | SO_KIT_INIT_INSTANCEcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:546:9`!(); |
| 116 | |
| 117 | // Make the anti-squish node surround the biggest dimension |
| 118 | SoAntiSquishcxx . . $ SoAntiSquish# *as = SO_GET_ANY_PARTcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoBaseKit.h:424:9`!( this,"antiSquish", SoAntiSquish ); |
| 119 | as->sizingcxx . . $ SoAntiSquish#sizing. =cxx . . $ SoSFEnum#`operator=`(7864480464b09eea). SoAntiSquishcxx . . $ SoAntiSquish#::BIGGEST_DIMENSIONcxx . . $ SoAntiSquish#BIGGEST_DIMENSION.; |
| 120 | |
| 121 | // CREATE THE CHILD DRAGGERS: |
| 122 | SoDraggercxx . . $ SoDragger# *sD = SO_GET_ANY_PARTcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoBaseKit.h:424:9`!( this,"scaler", SoScaleUniformDragger ); |
| 123 | SoDraggercxx . . $ SoDragger# *rD = SO_GET_ANY_PARTcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoBaseKit.h:424:9`!( this,"rotator", SoRotateSphericalDragger ); |
| 124 | SoDraggercxx . . $ SoDragger# *tD = SO_GET_ANY_PARTcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoBaseKit.h:424:9`!( this,"translator", SoDragPointDragger ); |
| 125 | |
| 126 | // Update the rotation and scale fields when the motionMatrix is set. |
| 127 | addValueChangedCallbackcxx . . $ SoDragger#addValueChangedCallback(5d3f11b67c4aec04).( &SoJackDraggercxx . . $ SoJackDragger#::valueChangedCBcxx . . $ SoJackDragger#valueChangedCB(7027446dc0b7318f). ); |
| 128 | |
| 129 | // Updates the motionMatrix when the scaleFactor field is set. |
| 130 | rotFieldSensorcxx . . $ SoJackDragger#rotFieldSensor. = new SoFieldSensorcxx . . $ SoFieldSensor#(&SoJackDraggercxx . . $ SoJackDragger#::fieldSensorCBcxx . . $ SoJackDragger#fieldSensorCB(c8d298b3e215c027)., this); |
| 131 | rotFieldSensorcxx . . $ SoJackDragger#rotFieldSensor.->setPrioritycxx . . $ SoDelayQueueSensor#setPriority(cb2f890c2fdad230).( 0 ); |
| 132 | |
| 133 | // Updates the motionMatrix when the translationFactor field is set. |
| 134 | translFieldSensorcxx . . $ SoJackDragger#translFieldSensor. |
| 135 | = new SoFieldSensorcxx . . $ SoFieldSensor#( &SoJackDraggercxx . . $ SoJackDragger#::fieldSensorCBcxx . . $ SoJackDragger#fieldSensorCB(c8d298b3e215c027)., this); |
| 136 | translFieldSensorcxx . . $ SoJackDragger#translFieldSensor.->setPrioritycxx . . $ SoDelayQueueSensor#setPriority(cb2f890c2fdad230).( 0 ); |
| 137 | |
| 138 | // Updates the motionMatrix when the scaleFactor field is set. |
| 139 | scaleFieldSensorcxx . . $ SoJackDragger#scaleFieldSensor. |
| 140 | = new SoFieldSensorcxx . . $ SoFieldSensor#( &SoJackDraggercxx . . $ SoJackDragger#::fieldSensorCBcxx . . $ SoJackDragger#fieldSensorCB(c8d298b3e215c027)., this); |
| 141 | scaleFieldSensorcxx . . $ SoJackDragger#scaleFieldSensor.->setPrioritycxx . . $ SoDelayQueueSensor#setPriority(cb2f890c2fdad230).( 0 ); |
| 142 | |
| 143 | setUpConnectionscxx . . $ SoJackDragger#setUpConnections(9b79fb6aee4c0440).( TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!, TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`! ); |
| 144 | } |
| 145 | |
| 146 | //////////////////////////////////////////////////////////////////////// |
| 147 | // |
| 148 | // Description: |
| 149 | // Destructor |
| 150 | // |
| 151 | SoJackDraggercxx . . $ SoJackDragger#::~cxx . . $ SoJackDragger#`~SoJackDragger`(49f6e7a06ebc5aa8).SoJackDraggercxx . . $ SoJackDragger#() |
| 152 | // |
| 153 | //////////////////////////////////////////////////////////////////////// |
| 154 | { |
| 155 | if (rotFieldSensorcxx . . $ SoJackDragger#rotFieldSensor.) |
| 156 | delete rotFieldSensorcxx . . $ SoJackDragger#rotFieldSensor.; |
| 157 | if (translFieldSensorcxx . . $ SoJackDragger#translFieldSensor. ) |
| 158 | delete translFieldSensorcxx . . $ SoJackDragger#translFieldSensor.; |
| 159 | if (scaleFieldSensorcxx . . $ SoJackDragger#scaleFieldSensor. ) |
| 160 | delete scaleFieldSensorcxx . . $ SoJackDragger#scaleFieldSensor.; |
| 161 | } |
| 162 | |
| 163 | // detach/attach any sensors, callbacks, and/or field connections. |
| 164 | // Called by: start/end of SoBaseKit::readInstance |
| 165 | // and on new copy by: start/end of SoBaseKit::copy. |
| 166 | // Classes that redefine must call setUpConnections(TRUE,TRUE) |
| 167 | // at end of constructor. |
| 168 | // Returns the state of the node when this was called. |
| 169 | SbBoolcxx . . $ SbBool# |
| 170 | SoJackDraggercxx . . $ SoJackDragger#::setUpConnectionscxx . . $ SoJackDragger#setUpConnections(9b79fb6aee4c0440).( SbBoolcxx . . $ SbBool# onOff, SbBoolcxx . . $ SbBool# doItAlways ) |
| 171 | { |
| 172 | if ( !doItAlways && connectionsSetUpcxx . . $ SoBaseKit#connectionsSetUp. == onOff) |
| 173 | return onOff; |
| 174 | |
| 175 | if ( onOff ) { |
| 176 | |
| 177 | // We connect AFTER base class. |
| 178 | SoDraggercxx . . $ SoDragger#::setUpConnectionscxx . . $ SoInteractionKit#setUpConnections(9b79fb6aee4c0440).( onOff, FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! ); |
| 179 | |
| 180 | // Set up the parts and callbacks in the child dragger |
| 181 | // Create a scaling dragger. |
| 182 | SoDraggercxx . . $ SoDragger# *sD = (SoDraggercxx . . $ SoDragger# *) getAnyPartcxx . . $ SoInteractionKit#getAnyPart(e7d7a7aae96def2f).( "scaler"cxx . . $ SbName#SbName(85c52e162fed56f9)., FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`!); |
| 183 | if (sD) { |
| 184 | sD->setPartAsDefaultcxx . . $ SoInteractionKit#setPartAsDefault(91c97549ed5f0a6b).("scaler"cxx . . $ SbName#SbName(85c52e162fed56f9)., "jackScalerScaler"cxx . . $ SbName#SbName(85c52e162fed56f9). ); |
| 185 | sD->setPartAsDefaultcxx . . $ SoInteractionKit#setPartAsDefault(91c97549ed5f0a6b).("scalerActive"cxx . . $ SbName#SbName(85c52e162fed56f9)., "jackScalerScalerActive"cxx . . $ SbName#SbName(85c52e162fed56f9).); |
| 186 | sD->setPartAsDefaultcxx . . $ SoInteractionKit#setPartAsDefault(91c97549ed5f0a6b).("feedback"cxx . . $ SbName#SbName(85c52e162fed56f9)., "jackScalerFeedback"cxx . . $ SbName#SbName(85c52e162fed56f9). ); |
| 187 | sD->setPartAsDefaultcxx . . $ SoInteractionKit#setPartAsDefault(91c97549ed5f0a6b).("feedbackActive"cxx . . $ SbName#SbName(85c52e162fed56f9)., "jackScalerFeedbackActive"cxx . . $ SbName#SbName(85c52e162fed56f9).); |
| 188 | sD->addStartCallbackcxx . . $ SoDragger#addStartCallback(5d3f11b67c4aec04).( |
| 189 | &SoJackDraggercxx . . $ SoJackDragger#::invalidateSurroundScaleCBcxx . . $ SoJackDragger#invalidateSurroundScaleCB(7027446dc0b7318f)., this); |
| 190 | sD->addFinishCallbackcxx . . $ SoDragger#addFinishCallback(5d3f11b67c4aec04).( |
| 191 | &SoJackDraggercxx . . $ SoJackDragger#::invalidateSurroundScaleCBcxx . . $ SoJackDragger#invalidateSurroundScaleCB(7027446dc0b7318f).,this); |
| 192 | registerChildDraggercxx . . $ SoDragger#registerChildDragger(d47e389994d178b5).( sD ); |
| 193 | } |
| 194 | |
| 195 | // Create a spherical rotator. |
| 196 | SoDraggercxx . . $ SoDragger# *rD = (SoDraggercxx . . $ SoDragger# *) getAnyPartcxx . . $ SoInteractionKit#getAnyPart(e7d7a7aae96def2f).( "rotator"cxx . . $ SbName#SbName(85c52e162fed56f9)., FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! ); |
| 197 | if (rD) { |
| 198 | rD->setPartAsDefaultcxx . . $ SoInteractionKit#setPartAsDefault(91c97549ed5f0a6b).("rotator"cxx . . $ SbName#SbName(85c52e162fed56f9)., "jackRotatorRotator"cxx . . $ SbName#SbName(85c52e162fed56f9). ); |
| 199 | rD->setPartAsDefaultcxx . . $ SoInteractionKit#setPartAsDefault(91c97549ed5f0a6b).("rotatorActive"cxx . . $ SbName#SbName(85c52e162fed56f9)., "jackRotatorRotatorActive"cxx . . $ SbName#SbName(85c52e162fed56f9).); |
| 200 | rD->setPartAsDefaultcxx . . $ SoInteractionKit#setPartAsDefault(91c97549ed5f0a6b).("feedback"cxx . . $ SbName#SbName(85c52e162fed56f9)., "jackRotatorFeedback"cxx . . $ SbName#SbName(85c52e162fed56f9). ); |
| 201 | rD->setPartAsDefaultcxx . . $ SoInteractionKit#setPartAsDefault(91c97549ed5f0a6b).("feedbackActive"cxx . . $ SbName#SbName(85c52e162fed56f9)., "jackRotatorFeedbackActive"cxx . . $ SbName#SbName(85c52e162fed56f9).); |
| 202 | rD->addStartCallbackcxx . . $ SoDragger#addStartCallback(5d3f11b67c4aec04).( |
| 203 | &SoJackDraggercxx . . $ SoJackDragger#::invalidateSurroundScaleCBcxx . . $ SoJackDragger#invalidateSurroundScaleCB(7027446dc0b7318f)., this); |
| 204 | rD->addFinishCallbackcxx . . $ SoDragger#addFinishCallback(5d3f11b67c4aec04).( |
| 205 | &SoJackDraggercxx . . $ SoJackDragger#::invalidateSurroundScaleCBcxx . . $ SoJackDragger#invalidateSurroundScaleCB(7027446dc0b7318f).,this); |
| 206 | registerChildDraggercxx . . $ SoDragger#registerChildDragger(d47e389994d178b5).( rD ); |
| 207 | } |
| 208 | |
| 209 | // Create a translator with dragpoint. |
| 210 | SoDraggercxx . . $ SoDragger# *dD = (SoDraggercxx . . $ SoDragger# *) getAnyPartcxx . . $ SoInteractionKit#getAnyPart(e7d7a7aae96def2f).( "translator"cxx . . $ SbName#SbName(85c52e162fed56f9)., FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! ); |
| 211 | if (dD) { |
| 212 | SoNodecxx . . $ SoNode# *n; |
| 213 | n = SoNodecxx . . $ SoNode#::getByNamecxx . . $ SoNode#getByName(bf62e009e5fb797f).("jackTranslatorLineTranslator"cxx . . $ SbName#SbName(85c52e162fed56f9).); |
| 214 | dD->setPartAsDefaultcxx . . $ SoInteractionKit#setPartAsDefault(9a61422242ad1ac7).("xTranslator.translator"cxx . . $ SbName#SbName(85c52e162fed56f9)., n ); |
| 215 | dD->setPartAsDefaultcxx . . $ SoInteractionKit#setPartAsDefault(9a61422242ad1ac7).("yTranslator.translator"cxx . . $ SbName#SbName(85c52e162fed56f9)., n ); |
| 216 | dD->setPartAsDefaultcxx . . $ SoInteractionKit#setPartAsDefault(9a61422242ad1ac7).("zTranslator.translator"cxx . . $ SbName#SbName(85c52e162fed56f9)., n ); |
| 217 | |
| 218 | n = SoNodecxx . . $ SoNode#::getByNamecxx . . $ SoNode#getByName(bf62e009e5fb797f).("jackTranslatorLineTranslatorActive"cxx . . $ SbName#SbName(85c52e162fed56f9).); |
| 219 | dD->setPartAsDefaultcxx . . $ SoInteractionKit#setPartAsDefault(9a61422242ad1ac7).("xTranslator.translatorActive"cxx . . $ SbName#SbName(85c52e162fed56f9)., n ); |
| 220 | dD->setPartAsDefaultcxx . . $ SoInteractionKit#setPartAsDefault(9a61422242ad1ac7).("yTranslator.translatorActive"cxx . . $ SbName#SbName(85c52e162fed56f9)., n ); |
| 221 | dD->setPartAsDefaultcxx . . $ SoInteractionKit#setPartAsDefault(9a61422242ad1ac7).("zTranslator.translatorActive"cxx . . $ SbName#SbName(85c52e162fed56f9)., n ); |
| 222 | |
| 223 | n = SoNodecxx . . $ SoNode#::getByNamecxx . . $ SoNode#getByName(bf62e009e5fb797f).("jackTranslatorPlaneTranslator"cxx . . $ SbName#SbName(85c52e162fed56f9).); |
| 224 | dD->setPartAsDefaultcxx . . $ SoInteractionKit#setPartAsDefault(9a61422242ad1ac7).("yzTranslator.translator"cxx . . $ SbName#SbName(85c52e162fed56f9)., n ); |
| 225 | dD->setPartAsDefaultcxx . . $ SoInteractionKit#setPartAsDefault(9a61422242ad1ac7).("xzTranslator.translator"cxx . . $ SbName#SbName(85c52e162fed56f9)., n ); |
| 226 | dD->setPartAsDefaultcxx . . $ SoInteractionKit#setPartAsDefault(9a61422242ad1ac7).("xyTranslator.translator"cxx . . $ SbName#SbName(85c52e162fed56f9)., n ); |
| 227 | |
| 228 | n = SoNodecxx . . $ SoNode#::getByNamecxx . . $ SoNode#getByName(bf62e009e5fb797f).("jackTranslatorPlaneTranslatorActive"cxx . . $ SbName#SbName(85c52e162fed56f9).); |
| 229 | dD->setPartAsDefaultcxx . . $ SoInteractionKit#setPartAsDefault(9a61422242ad1ac7).("yzTranslator.translatorActive"cxx . . $ SbName#SbName(85c52e162fed56f9)., n ); |
| 230 | dD->setPartAsDefaultcxx . . $ SoInteractionKit#setPartAsDefault(9a61422242ad1ac7).("xzTranslator.translatorActive"cxx . . $ SbName#SbName(85c52e162fed56f9)., n ); |
| 231 | dD->setPartAsDefaultcxx . . $ SoInteractionKit#setPartAsDefault(9a61422242ad1ac7).("xyTranslator.translatorActive"cxx . . $ SbName#SbName(85c52e162fed56f9)., n ); |
| 232 | |
| 233 | dD->setPartAsDefaultcxx . . $ SoInteractionKit#setPartAsDefault(91c97549ed5f0a6b).("xFeedback"cxx . . $ SbName#SbName(85c52e162fed56f9)., "jackTranslatorXFeedback"cxx . . $ SbName#SbName(85c52e162fed56f9). ); |
| 234 | dD->setPartAsDefaultcxx . . $ SoInteractionKit#setPartAsDefault(91c97549ed5f0a6b).("yFeedback"cxx . . $ SbName#SbName(85c52e162fed56f9)., "jackTranslatorYFeedback"cxx . . $ SbName#SbName(85c52e162fed56f9).); |
| 235 | dD->setPartAsDefaultcxx . . $ SoInteractionKit#setPartAsDefault(91c97549ed5f0a6b).("zFeedback"cxx . . $ SbName#SbName(85c52e162fed56f9)., "jackTranslatorZFeedback"cxx . . $ SbName#SbName(85c52e162fed56f9). ); |
| 236 | dD->setPartAsDefaultcxx . . $ SoInteractionKit#setPartAsDefault(91c97549ed5f0a6b).("yzFeedback"cxx . . $ SbName#SbName(85c52e162fed56f9)., "jackTranslatorYZFeedback"cxx . . $ SbName#SbName(85c52e162fed56f9). ); |
| 237 | dD->setPartAsDefaultcxx . . $ SoInteractionKit#setPartAsDefault(91c97549ed5f0a6b).("xzFeedback"cxx . . $ SbName#SbName(85c52e162fed56f9)., "jackTranslatorXZFeedback"cxx . . $ SbName#SbName(85c52e162fed56f9). ); |
| 238 | dD->setPartAsDefaultcxx . . $ SoInteractionKit#setPartAsDefault(91c97549ed5f0a6b).("xyFeedback"cxx . . $ SbName#SbName(85c52e162fed56f9)., "jackTranslatorXYFeedback"cxx . . $ SbName#SbName(85c52e162fed56f9). ); |
| 239 | |
| 240 | dD->addStartCallbackcxx . . $ SoDragger#addStartCallback(5d3f11b67c4aec04).( |
| 241 | &SoJackDraggercxx . . $ SoJackDragger#::invalidateSurroundScaleCBcxx . . $ SoJackDragger#invalidateSurroundScaleCB(7027446dc0b7318f)., this); |
| 242 | dD->addFinishCallbackcxx . . $ SoDragger#addFinishCallback(5d3f11b67c4aec04).( |
| 243 | &SoJackDraggercxx . . $ SoJackDragger#::invalidateSurroundScaleCBcxx . . $ SoJackDragger#invalidateSurroundScaleCB(7027446dc0b7318f).,this); |
| 244 | |
| 245 | registerChildDraggercxx . . $ SoDragger#registerChildDragger(d47e389994d178b5).( dD ); |
| 246 | } |
| 247 | |
| 248 | // Call the sensor CBs to make things are up-to-date. |
| 249 | fieldSensorCBcxx . . $ SoJackDragger#fieldSensorCB(c8d298b3e215c027).( this, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ); |
| 250 | |
| 251 | // Connect the field sensors |
| 252 | if (rotFieldSensorcxx . . $ SoJackDragger#rotFieldSensor.->getAttachedFieldcxx . . $ SoFieldSensor#getAttachedField(c4a4d937024b6702).() != &rotationcxx . . $ SoJackDragger#rotation.) |
| 253 | rotFieldSensorcxx . . $ SoJackDragger#rotFieldSensor.->attachcxx . . $ SoFieldSensor#attach(6a35cc9f7090653f).( &rotationcxx . . $ SoJackDragger#rotation. ); |
| 254 | if (translFieldSensorcxx . . $ SoJackDragger#translFieldSensor.->getAttachedFieldcxx . . $ SoFieldSensor#getAttachedField(c4a4d937024b6702).() != &translationcxx . . $ SoJackDragger#translation.) |
| 255 | translFieldSensorcxx . . $ SoJackDragger#translFieldSensor.->attachcxx . . $ SoFieldSensor#attach(6a35cc9f7090653f).( &translationcxx . . $ SoJackDragger#translation. ); |
| 256 | if (scaleFieldSensorcxx . . $ SoJackDragger#scaleFieldSensor.->getAttachedFieldcxx . . $ SoFieldSensor#getAttachedField(c4a4d937024b6702).() != &scaleFactorcxx . . $ SoJackDragger#scaleFactor.) |
| 257 | scaleFieldSensorcxx . . $ SoJackDragger#scaleFieldSensor.->attachcxx . . $ SoFieldSensor#attach(6a35cc9f7090653f).( &scaleFactorcxx . . $ SoJackDragger#scaleFactor. ); |
| 258 | } |
| 259 | else { |
| 260 | |
| 261 | // We disconnect BEFORE base class. |
| 262 | |
| 263 | // Set up the parts and callbacks in the child dragger |
| 264 | // Create a scaling dragger. |
| 265 | SoDraggercxx . . $ SoDragger# *sD = (SoDraggercxx . . $ SoDragger# *) getAnyPartcxx . . $ SoInteractionKit#getAnyPart(e7d7a7aae96def2f).( "scaler"cxx . . $ SbName#SbName(85c52e162fed56f9)., FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`!); |
| 266 | if (sD) { |
| 267 | sD->removeStartCallbackcxx . . $ SoDragger#removeStartCallback(5d3f11b67c4aec04).( |
| 268 | &SoJackDraggercxx . . $ SoJackDragger#::invalidateSurroundScaleCBcxx . . $ SoJackDragger#invalidateSurroundScaleCB(7027446dc0b7318f)., this); |
| 269 | sD->removeFinishCallbackcxx . . $ SoDragger#removeFinishCallback(5d3f11b67c4aec04).( |
| 270 | &SoJackDraggercxx . . $ SoJackDragger#::invalidateSurroundScaleCBcxx . . $ SoJackDragger#invalidateSurroundScaleCB(7027446dc0b7318f).,this); |
| 271 | unregisterChildDraggercxx . . $ SoDragger#unregisterChildDragger(d47e389994d178b5).( sD ); |
| 272 | } |
| 273 | |
| 274 | // Create a spherical rotator. |
| 275 | SoDraggercxx . . $ SoDragger# *rD = (SoDraggercxx . . $ SoDragger# *) getAnyPartcxx . . $ SoInteractionKit#getAnyPart(e7d7a7aae96def2f).( "rotator"cxx . . $ SbName#SbName(85c52e162fed56f9)., FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! ); |
| 276 | if (rD) { |
| 277 | rD->removeStartCallbackcxx . . $ SoDragger#removeStartCallback(5d3f11b67c4aec04).( |
| 278 | &SoJackDraggercxx . . $ SoJackDragger#::invalidateSurroundScaleCBcxx . . $ SoJackDragger#invalidateSurroundScaleCB(7027446dc0b7318f)., this); |
| 279 | rD->removeFinishCallbackcxx . . $ SoDragger#removeFinishCallback(5d3f11b67c4aec04).( |
| 280 | &SoJackDraggercxx . . $ SoJackDragger#::invalidateSurroundScaleCBcxx . . $ SoJackDragger#invalidateSurroundScaleCB(7027446dc0b7318f).,this); |
| 281 | unregisterChildDraggercxx . . $ SoDragger#unregisterChildDragger(d47e389994d178b5).( rD ); |
| 282 | } |
| 283 | |
| 284 | // Create a translator with dragpoint. |
| 285 | SoDraggercxx . . $ SoDragger# *dD = (SoDraggercxx . . $ SoDragger# *) getAnyPartcxx . . $ SoInteractionKit#getAnyPart(e7d7a7aae96def2f).( "translator"cxx . . $ SbName#SbName(85c52e162fed56f9)., FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! ); |
| 286 | if (dD) { |
| 287 | dD->setPartAsDefaultcxx . . $ SoInteractionKit#setPartAsDefault(91c97549ed5f0a6b).("xFeedback"cxx . . $ SbName#SbName(85c52e162fed56f9)., "jackTranslatorXFeedback"cxx . . $ SbName#SbName(85c52e162fed56f9). ); |
| 288 | dD->setPartAsDefaultcxx . . $ SoInteractionKit#setPartAsDefault(91c97549ed5f0a6b).("yFeedback"cxx . . $ SbName#SbName(85c52e162fed56f9)., "jackTranslatorYFeedback"cxx . . $ SbName#SbName(85c52e162fed56f9).); |
| 289 | dD->setPartAsDefaultcxx . . $ SoInteractionKit#setPartAsDefault(91c97549ed5f0a6b).("zFeedback"cxx . . $ SbName#SbName(85c52e162fed56f9)., "jackTranslatorZFeedback"cxx . . $ SbName#SbName(85c52e162fed56f9). ); |
| 290 | dD->setPartAsDefaultcxx . . $ SoInteractionKit#setPartAsDefault(91c97549ed5f0a6b).("yzFeedback"cxx . . $ SbName#SbName(85c52e162fed56f9)., "jackTranslatorYZFeedback"cxx . . $ SbName#SbName(85c52e162fed56f9). ); |
| 291 | dD->setPartAsDefaultcxx . . $ SoInteractionKit#setPartAsDefault(91c97549ed5f0a6b).("xzFeedback"cxx . . $ SbName#SbName(85c52e162fed56f9)., "jackTranslatorXZFeedback"cxx . . $ SbName#SbName(85c52e162fed56f9). ); |
| 292 | dD->setPartAsDefaultcxx . . $ SoInteractionKit#setPartAsDefault(91c97549ed5f0a6b).("xyFeedback"cxx . . $ SbName#SbName(85c52e162fed56f9)., "jackTranslatorXYFeedback"cxx . . $ SbName#SbName(85c52e162fed56f9). ); |
| 293 | |
| 294 | dD->removeStartCallbackcxx . . $ SoDragger#removeStartCallback(5d3f11b67c4aec04).( |
| 295 | &SoJackDraggercxx . . $ SoJackDragger#::invalidateSurroundScaleCBcxx . . $ SoJackDragger#invalidateSurroundScaleCB(7027446dc0b7318f)., this); |
| 296 | dD->removeFinishCallbackcxx . . $ SoDragger#removeFinishCallback(5d3f11b67c4aec04).( |
| 297 | &SoJackDraggercxx . . $ SoJackDragger#::invalidateSurroundScaleCBcxx . . $ SoJackDragger#invalidateSurroundScaleCB(7027446dc0b7318f).,this); |
| 298 | |
| 299 | unregisterChildDraggercxx . . $ SoDragger#unregisterChildDragger(d47e389994d178b5).( dD ); |
| 300 | } |
| 301 | |
| 302 | // Disconnect the field sensors. |
| 303 | if (rotFieldSensorcxx . . $ SoJackDragger#rotFieldSensor.->getAttachedFieldcxx . . $ SoFieldSensor#getAttachedField(c4a4d937024b6702).()) |
| 304 | rotFieldSensorcxx . . $ SoJackDragger#rotFieldSensor.->detachcxx . . $ SoFieldSensor#detach(49f6e7a06ebc5aa8).(); |
| 305 | if (translFieldSensorcxx . . $ SoJackDragger#translFieldSensor.->getAttachedFieldcxx . . $ SoFieldSensor#getAttachedField(c4a4d937024b6702).()) |
| 306 | translFieldSensorcxx . . $ SoJackDragger#translFieldSensor.->detachcxx . . $ SoFieldSensor#detach(49f6e7a06ebc5aa8).(); |
| 307 | if (scaleFieldSensorcxx . . $ SoJackDragger#scaleFieldSensor.->getAttachedFieldcxx . . $ SoFieldSensor#getAttachedField(c4a4d937024b6702).()) |
| 308 | scaleFieldSensorcxx . . $ SoJackDragger#scaleFieldSensor.->detachcxx . . $ SoFieldSensor#detach(49f6e7a06ebc5aa8).(); |
| 309 | |
| 310 | SoDraggercxx . . $ SoDragger#::setUpConnectionscxx . . $ SoInteractionKit#setUpConnections(9b79fb6aee4c0440).( onOff, FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! ); |
| 311 | } |
| 312 | |
| 313 | return !(connectionsSetUpcxx . . $ SoBaseKit#connectionsSetUp. = onOff); |
| 314 | } |
| 315 | |
| 316 | |
| 317 | void |
| 318 | SoJackDraggercxx . . $ SoJackDragger#::valueChangedCBcxx . . $ SoJackDragger#valueChangedCB(7027446dc0b7318f).( void *, SoDraggercxx . . $ SoDragger# *inDragger ) |
| 319 | { |
| 320 | SoJackDraggercxx . . $ SoJackDragger# *m = (SoJackDraggercxx . . $ SoJackDragger# *) inDragger; |
| 321 | SbMatrixcxx . . $ SbMatrix# motMat = m->getMotionMatrixcxx . . $ SoDragger#getMotionMatrix(c49c36ee78b0a89e).(); |
| 322 | |
| 323 | SbVec3fcxx . . $ SbVec3f# transcxx . . $ SbVec3f#SbVec3f(49f6e7a06ebc5aa8)., scalecxx . . $ SbVec3f#SbVec3f(49f6e7a06ebc5aa8).; |
| 324 | SbRotationcxx . . $ SbRotation# rotcxx . . $ SbRotation#SbRotation(49f6e7a06ebc5aa8)., scaleOrientcxx . . $ SbRotation#SbRotation(49f6e7a06ebc5aa8).; |
| 325 | getTransformFastcxx . . $ SoDragger#getTransformFast(87c9df4114162fa2).( motMat, trans, rot, scale, scaleOrient); |
| 326 | |
| 327 | // Disconnect the field sensors |
| 328 | m->rotFieldSensorcxx . . $ SoJackDragger#rotFieldSensor.->detachcxx . . $ SoFieldSensor#detach(49f6e7a06ebc5aa8).(); |
| 329 | m->translFieldSensorcxx . . $ SoJackDragger#translFieldSensor.->detachcxx . . $ SoFieldSensor#detach(49f6e7a06ebc5aa8).(); |
| 330 | m->scaleFieldSensorcxx . . $ SoJackDragger#scaleFieldSensor.->detachcxx . . $ SoFieldSensor#detach(49f6e7a06ebc5aa8).(); |
| 331 | |
| 332 | if ( m->rotationcxx . . $ SoJackDragger#rotation..getValuecxx . . $ SoSFRotation#getValue(cd68af149be99fa7).() !=cxx . . $ `operator!=`(63a2304dedfd8e48). rot ) |
| 333 | m->rotationcxx . . $ SoJackDragger#rotation. =cxx . . $ SoSFRotation#`operator=`(a110af7e76887ee8). rot; |
| 334 | if ( m->translationcxx . . $ SoJackDragger#translation..getValuecxx . . $ SoSFVec3f#getValue(b5c384c15c94bb12).() !=cxx . . $ `operator!=`(648f52454fd9f27). trans ) |
| 335 | m->translationcxx . . $ SoJackDragger#translation. =cxx . . $ SoSFVec3f#`operator=`(861f7885f8980b32). trans; |
| 336 | if ( m->scaleFactorcxx . . $ SoJackDragger#scaleFactor..getValuecxx . . $ SoSFVec3f#getValue(b5c384c15c94bb12).() !=cxx . . $ `operator!=`(648f52454fd9f27). scale ) |
| 337 | m->scaleFactorcxx . . $ SoJackDragger#scaleFactor. =cxx . . $ SoSFVec3f#`operator=`(861f7885f8980b32). scale; |
| 338 | |
| 339 | // Reconnect the field sensors |
| 340 | m->rotFieldSensorcxx . . $ SoJackDragger#rotFieldSensor.->attachcxx . . $ SoFieldSensor#attach(6a35cc9f7090653f).( &(m->rotationcxx . . $ SoJackDragger#rotation.) ); |
| 341 | m->translFieldSensorcxx . . $ SoJackDragger#translFieldSensor.->attachcxx . . $ SoFieldSensor#attach(6a35cc9f7090653f).( &(m->translationcxx . . $ SoJackDragger#translation.) ); |
| 342 | m->scaleFieldSensorcxx . . $ SoJackDragger#scaleFieldSensor.->attachcxx . . $ SoFieldSensor#attach(6a35cc9f7090653f).( &(m->scaleFactorcxx . . $ SoJackDragger#scaleFactor.) ); |
| 343 | } |
| 344 | |
| 345 | void |
| 346 | SoJackDraggercxx . . $ SoJackDragger#::fieldSensorCBcxx . . $ SoJackDragger#fieldSensorCB(c8d298b3e215c027).( void *inDragger, SoSensorcxx . . $ SoSensor# * ) |
| 347 | { |
| 348 | SoJackDraggercxx . . $ SoJackDragger# *dragger = (SoJackDraggercxx . . $ SoJackDragger# *) inDragger; |
| 349 | |
| 350 | SbMatrixcxx . . $ SbMatrix# motMat = dragger->getMotionMatrixcxx . . $ SoDragger#getMotionMatrix(c49c36ee78b0a89e).(); |
| 351 | dragger->workFieldsIntoTransformcxx . . $ SoDragger#workFieldsIntoTransform(ab60305a37435a6f).( motMat ); |
| 352 | |
| 353 | dragger->setMotionMatrixcxx . . $ SoDragger#setMotionMatrix(37d2f951b3ffd7a6).( motMat ); |
| 354 | } |
| 355 | |
| 356 | void |
| 357 | SoJackDraggercxx . . $ SoJackDragger#::invalidateSurroundScaleCBcxx . . $ SoJackDragger#invalidateSurroundScaleCB(7027446dc0b7318f).( void *parentAsVoid, SoDraggercxx . . $ SoDragger# * ) |
| 358 | { |
| 359 | SoJackDraggercxx . . $ SoJackDragger# *jD = (SoJackDraggercxx . . $ SoJackDragger# *) parentAsVoid; |
| 360 | |
| 361 | // Invalidate the surroundScale, if it exists. |
| 362 | SoSurroundScalecxx . . $ SoSurroundScale# *ss = SO_CHECK_PARTcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoBaseKit.h:422:9`!(jD, "surroundScale", SoSurroundScale ); |
| 363 | if (ss != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) |
| 364 | ss->invalidatecxx . . $ SoSurroundScale#invalidate(49f6e7a06ebc5aa8).(); |
| 365 | } |
| 366 | |
| 367 | void |
| 368 | SoJackDraggercxx . . $ SoJackDragger#::setDefaultOnNonWritingFieldscxx . . $ SoJackDragger#setDefaultOnNonWritingFields(49f6e7a06ebc5aa8).() |
| 369 | { |
| 370 | // These nodes may change after construction, but we still |
| 371 | // don't want to write them out. |
| 372 | surroundScalecxx . . $ SoJackDragger#surroundScale..setDefaultcxx . . $ SoField#setDefault(d4f767463ce0a6b3).(TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!); |
| 373 | antiSquishcxx . . $ SoJackDragger#antiSquish..setDefaultcxx . . $ SoField#setDefault(d4f767463ce0a6b3).(TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!); |
| 374 | |
| 375 | // Try not to write out the sub-draggers. |
| 376 | scalercxx . . $ SoJackDragger#scaler..setDefaultcxx . . $ SoField#setDefault(d4f767463ce0a6b3).(TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!); |
| 377 | rotatorcxx . . $ SoJackDragger#rotator..setDefaultcxx . . $ SoField#setDefault(d4f767463ce0a6b3).(TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!); |
| 378 | translatorcxx . . $ SoJackDragger#translator..setDefaultcxx . . $ SoField#setDefault(d4f767463ce0a6b3).(TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!); |
| 379 | |
| 380 | // Call the base class... |
| 381 | SoDraggercxx . . $ SoDragger#::setDefaultOnNonWritingFieldscxx . . $ SoDragger#setDefaultOnNonWritingFields(49f6e7a06ebc5aa8).(); |
| 382 | } |