| 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) 1991-93 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 | | SoXtDirectionalLightEditor |
| 47 | | |
| 48 | | Author(s): David Mott, Paul Isaacs, Alain Dumesny |
| 49 | | |
| 50 | | |
| 51 | ______________ S I L I C O N G R A P H I C S I N C . ____________ |
| 52 | _______________________________________________________________________ |
| 53 | */ |
| 54 | |
| 55 | #include <inttypes.h> |
| 56 | #include <X11/StringDefs.h> |
| 57 | #include <Xm/Xm.h> |
| 58 | #include <Xm/CascadeBG.h> |
| 59 | #include <Xm/Form.h> |
| 60 | #include <Xm/PushBG.h> |
| 61 | #include <Xm/RowColumn.h> |
| 62 | #include <Xm/Separator.h> |
| 63 | #include <Xm/SeparatoG.h> |
| 64 | #include <Xm/ToggleB.h> |
| 65 | #include <Xm/ToggleBG.h> |
| 66 | |
| 67 | #include <Inventor/SoDB.h>cxx . . $ `<file>/lib/database/include/Inventor/SoDB.h`/ |
| 68 | #include <Inventor/Xt/SoXt.h>cxx . . $ `<file>/libSoXt/include/Inventor/Xt/SoXt.h`/ |
| 69 | #include <Inventor/Xt/SoXtClipboard.h>cxx . . $ `<file>/libSoXt/include/Inventor/Xt/SoXtClipboard.h`/ |
| 70 | #include <Inventor/Xt/SoXtDirectionalLightEditor.h>cxx . . $ `<file>/libSoXt/include/Inventor/Xt/SoXtDirectionalLightEditor.h`/ |
| 71 | #include <Inventor/sensors/SoNodeSensor.h>cxx . . $ `<file>/lib/database/include/Inventor/sensors/SoNodeSensor.h`/ |
| 72 | #include <Inventor/actions/SoSearchAction.h>cxx . . $ `<file>/lib/database/include/Inventor/actions/SoSearchAction.h`/ |
| 73 | #include <Inventor/draggers/SoDragger.h>cxx . . $ `<file>/lib/interaction/include/Inventor/draggers/SoDragger.h`/ |
| 74 | #include <Inventor/manips/SoDirectionalLightManip.h>cxx . . $ `<file>/lib/interaction/include/Inventor/manips/SoDirectionalLightManip.h`/ |
| 75 | #include <Inventor/nodes/SoBaseColor.h>cxx . . $ `<file>/lib/database/include/Inventor/nodes/SoBaseColor.h`/ |
| 76 | #include <Inventor/nodes/SoComplexity.h>cxx . . $ `<file>/lib/database/include/Inventor/nodes/SoComplexity.h`/ |
| 77 | #include <Inventor/nodes/SoDirectionalLight.h>cxx . . $ `<file>/lib/database/include/Inventor/nodes/SoDirectionalLight.h`/ |
| 78 | #include <Inventor/nodes/SoEnvironment.h>cxx . . $ `<file>/lib/database/include/Inventor/nodes/SoEnvironment.h`/ |
| 79 | #include <Inventor/nodes/SoMaterial.h>cxx . . $ `<file>/lib/database/include/Inventor/nodes/SoMaterial.h`/ |
| 80 | #include <Inventor/nodes/SoPerspectiveCamera.h>cxx . . $ `<file>/lib/database/include/Inventor/nodes/SoPerspectiveCamera.h`/ |
| 81 | #include <Inventor/nodes/SoSeparator.h>cxx . . $ `<file>/lib/database/include/Inventor/nodes/SoSeparator.h`/ |
| 82 | #include <Inventor/nodes/SoSphere.h>cxx . . $ `<file>/lib/database/include/Inventor/nodes/SoSphere.h`/ |
| 83 | #include <Inventor/Xt/SoXtRenderArea.h>cxx . . $ `<file>/libSoXt/include/Inventor/Xt/SoXtRenderArea.h`/ |
| 84 | #include <Inventor/errors/SoDebugError.h>cxx . . $ `<file>/lib/database/include/Inventor/errors/SoDebugError.h`/ |
| 85 | #include <Inventor/Xt/SoXtResource.h>cxx . . $ `<file>/libSoXt/include/Inventor/Xt/SoXtResource.h`/ |
| 86 | #include "_SoXtColorEditor.h"cxx . . $ `<file>/libSoXt/include/_SoXtColorEditor.h`/ |
| 87 | #include "_SoXtColorSlider.h"cxx . . $ `<file>/libSoXt/include/_SoXtColorSlider.h`/ |
| 88 | |
| 89 | /* |
| 90 | * Defines |
| 91 | */ |
| 92 | |
| 93 | #define DEFAULT_WIDTHcxx . . $ `libSoXt/src/lightEditor/SoXtDirLitEd.c++:93:9`! 200 |
| 94 | #define DEFAULT_HEIGHTcxx . . $ `libSoXt/src/lightEditor/SoXtDirLitEd.c++:94:9`! 250 |
| 95 | |
| 96 | // so far, there is only one menu |
| 97 | #define k_CONTROL_MENUcxx . . $ `libSoXt/src/lightEditor/SoXtDirLitEd.c++:97:9`! 0 |
| 98 | |
| 99 | // the menu items |
| 100 | enumcxx . . $ $anonymous_type_d1403f92c690a67f_0# { |
| 101 | k_COLOR_EDITORcxx . . $ k_COLOR_EDITOR. = 0, |
| 102 | k_COPYcxx . . $ k_COPY., |
| 103 | k_PASTEcxx . . $ k_PASTE., |
| 104 | k_HELPcxx . . $ k_HELP. |
| 105 | }; |
| 106 | |
| 107 | |
| 108 | // Resources for labels. |
| 109 | typedef structcxx . . $ $anonymous_type_d1403f92c690a67f_1# { |
| 110 | char *intencxx . . $ $anonymous_type_d1403f92c690a67f_1#inten.; |
| 111 | } RES_LABELScxx . . $ RES_LABELS#; |
| 112 | static RES_LABELScxx . . $ RES_LABELS# rlcxx . . $ rl.; |
| 113 | static char *defaultscxx . . $ defaults.[]={ |
| 114 | "Inten " |
| 115 | }; |
| 116 | |
| 117 | |
| 118 | #define TOGGLE_ONcxx . . $ `libSoXt/src/lightEditor/SoXtDirLitEd.c++:118:9`!(BUTTON) \ |
| 119 | XmToggleButtonSetState((Widget) BUTTON, TRUE, FALSE) |
| 120 | #define TOGGLE_OFFcxx . . $ `libSoXt/src/lightEditor/SoXtDirLitEd.c++:120:9`!(BUTTON) \ |
| 121 | XmToggleButtonSetState((Widget) BUTTON, FALSE, FALSE) |
| 122 | |
| 123 | |
| 124 | char *SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor#::geomBuffercxx . . $ SoXtDirectionalLightEditor#geomBuffer. = |
| 125 | "#Inventor V2.0 ascii\n\ |
| 126 | Separator {\n\ |
| 127 | DEF DIR_LIGHT_EDITOR_ROTATOR Group {\n\ |
| 128 | LightModel { model PHONG }\n\ |
| 129 | Separator {\n\ |
| 130 | Transform {\n\ |
| 131 | scaleFactor .2 .2 .2\n\ |
| 132 | rotation 1 0 0 -1.57079632679489661923 # PI/2\n\ |
| 133 | translation 0 0 1.2\n\ |
| 134 | }\n\ |
| 135 | Cone {}\n\ |
| 136 | }\n\ |
| 137 | Separator {\n\ |
| 138 | Transform {\n\ |
| 139 | scaleFactor .08 .3 .08\n\ |
| 140 | rotation 1 0 0 -1.57079632679489661923 # PI/2\n\ |
| 141 | translation 0 0 1.7\n\ |
| 142 | }\n\ |
| 143 | Cylinder {}\n\ |
| 144 | }\n\ |
| 145 | Separator {\n\ |
| 146 | Transform {\n\ |
| 147 | scaleFactor .1 .1 .1\n\ |
| 148 | rotation 1 0 0 -1.57079632679489661923 # PI/2\n\ |
| 149 | translation 0 0 -1.1\n\ |
| 150 | }\n\ |
| 151 | Cone {}\n\ |
| 152 | }\n\ |
| 153 | }\n\ |
| 154 | DEF dirLightEditorRotator Separator {\n\ |
| 155 | Material {\n\ |
| 156 | diffuseColor [ 0.5 0.5 0.5 ]\n\ |
| 157 | emissiveColor [ 0.5 0.5 0.5 ]\n\ |
| 158 | }\n\ |
| 159 | DrawStyle { lineWidth 2 }\n\ |
| 160 | USE DIR_LIGHT_EDITOR_ROTATOR\n\ |
| 161 | }\n\ |
| 162 | DEF dirLightEditorRotatorActive Separator {\n\ |
| 163 | Material {\n\ |
| 164 | diffuseColor [ 0.5 0.5 0.0 ]\n\ |
| 165 | emissiveColor [ 0.5 0.5 0.0 ]\n\ |
| 166 | }\n\ |
| 167 | DrawStyle { lineWidth 3 }\n\ |
| 168 | USE DIR_LIGHT_EDITOR_ROTATOR\n\ |
| 169 | }\n\ |
| 170 | }\n\ |
| 171 | "; |
| 172 | |
| 173 | |
| 174 | |
| 175 | //////////////////////////////////////////////////////////////////////// |
| 176 | // |
| 177 | // Public constructor - build the widget right now |
| 178 | // |
| 179 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor#::SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor#SoXtDirectionalLightEditor(13a1a66a4f5d094a).( |
| 180 | Widgetcxx . . $ Widget# parent, |
| 181 | const char *name, |
| 182 | SbBoolcxx . . $ SbBool# buildInsideParent) |
| 183 | : SoXtComponentcxx . . $ SoXtComponent#SoXtComponent(13a1a66a4f5d094a).( |
| 184 | parent, |
| 185 | name, |
| 186 | buildInsideParent) |
| 187 | // |
| 188 | //////////////////////////////////////////////////////////////////////// |
| 189 | { |
| 190 | // In this case, this component is what the app wants, so buildNow = TRUE |
| 191 | constructorCommoncxx . . $ SoXtDirectionalLightEditor#constructorCommon(d4f767463ce0a6b3).(TRUEcxx . . $ `<external>/3673480128541058774/Intrinsic.h:111:9`!); |
| 192 | } |
| 193 | |
| 194 | //////////////////////////////////////////////////////////////////////// |
| 195 | // |
| 196 | // SoEXTENDER constructor - the subclass tells us whether to build or not |
| 197 | // |
| 198 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor#::SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor#SoXtDirectionalLightEditor(d778020db9c00467).( |
| 199 | Widgetcxx . . $ Widget# parent, |
| 200 | const char *name, |
| 201 | SbBoolcxx . . $ SbBool# buildInsideParent, |
| 202 | SbBoolcxx . . $ SbBool# buildNow) |
| 203 | : SoXtComponentcxx . . $ SoXtComponent#SoXtComponent(13a1a66a4f5d094a).( |
| 204 | parent, |
| 205 | name, |
| 206 | buildInsideParent) |
| 207 | // |
| 208 | //////////////////////////////////////////////////////////////////////// |
| 209 | { |
| 210 | // In this case, this component may be what the app wants, |
| 211 | // or it may want a subclass of this component. Pass along buildNow |
| 212 | // as it was passed to us. |
| 213 | constructorCommoncxx . . $ SoXtDirectionalLightEditor#constructorCommon(d4f767463ce0a6b3).(buildNow); |
| 214 | } |
| 215 | |
| 216 | //////////////////////////////////////////////////////////////////////// |
| 217 | // |
| 218 | // Called by the constructors |
| 219 | // |
| 220 | // private |
| 221 | // |
| 222 | void |
| 223 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor#::constructorCommoncxx . . $ SoXtDirectionalLightEditor#constructorCommon(d4f767463ce0a6b3).(SbBoolcxx . . $ SbBool# buildNow) |
| 224 | // |
| 225 | ////////////////////////////////////////////////////////////////////// |
| 226 | { |
| 227 | setClassNamecxx . . $ SoXtComponent#setClassName(85c52e162fed56f9).("SoXtDirectionalLightEditor"); |
| 228 | addVisibilityChangeCallbackcxx . . $ SoXtComponent#addVisibilityChangeCallback(467929f4d186dae5).(visibilityChangeCBcxx . . $ SoXtDirectionalLightEditor#visibilityChangeCB(d0320739773070f2)., this); |
| 229 | dirLightcxx . . $ SoXtDirectionalLightEditor#dirLight. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 230 | clipboardcxx . . $ SoXtDirectionalLightEditor#clipboard. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 231 | callbackListcxx . . $ SoXtDirectionalLightEditor#callbackList. = new SoCallbackListcxx . . $ SoCallbackList#; |
| 232 | |
| 233 | // default title and size |
| 234 | setSizecxx . . $ SoXtComponent#setSize(8bc400dc8eb33072).( SbVec2scxx . . $ SbVec2s#SbVec2s(af780a7c10c7990f).(DEFAULT_WIDTHcxx . . $ `libSoXt/src/lightEditor/SoXtDirLitEd.c++:93:9`!, DEFAULT_HEIGHTcxx . . $ `libSoXt/src/lightEditor/SoXtDirLitEd.c++:94:9`!) ); |
| 235 | |
| 236 | // create the dir light manip with our own geom |
| 237 | SoInputcxx . . $ SoInput# incxx . . $ SoInput#SoInput(49f6e7a06ebc5aa8).; |
| 238 | in.setBuffercxx . . $ SoInput#setBuffer(5500c4293b1bbef0).((void *)geomBuffercxx . . $ SoXtDirectionalLightEditor#geomBuffer., (size_t) strlen(geomBuffercxx . . $ SoXtDirectionalLightEditor#geomBuffer.)); |
| 239 | SoNodecxx . . $ SoNode# *geom; |
| 240 | SbBoolcxx . . $ SbBool# ok = SoDBcxx . . $ SoDB#::readcxx . . $ SoDB#read(37dc7a38c6a5bc19).(&in, geom); |
| 241 | dirLightManipcxx . . $ SoXtDirectionalLightEditor#dirLightManip. = new SoDirectionalLightManipcxx . . $ SoDirectionalLightManip#SoDirectionalLightManip(49f6e7a06ebc5aa8).(); |
| 242 | dirLightManipcxx . . $ SoXtDirectionalLightEditor#dirLightManip.->refcxx . . $ SoBase#ref(83f5f38750778ac8).(); |
| 243 | |
| 244 | // Set the rotator to be our arrow. |
| 245 | SoDraggercxx . . $ SoDragger# *liteDragger = dirLightManipcxx . . $ SoXtDirectionalLightEditor#dirLightManip.->getDraggercxx . . $ SoDirectionalLightManip#getDragger(c79b48bf84989e60).(); |
| 246 | liteDragger->setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).("rotator.rotator"cxx . . $ SbName#SbName(85c52e162fed56f9)., |
| 247 | SoNodecxx . . $ SoNode#::getByNamecxx . . $ SoNode#getByName(bf62e009e5fb797f).("dirLightEditorRotator"cxx . . $ SbName#SbName(85c52e162fed56f9).)); |
| 248 | liteDragger->setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).("rotator.rotatorActive"cxx . . $ SbName#SbName(85c52e162fed56f9)., |
| 249 | SoNodecxx . . $ SoNode#::getByNamecxx . . $ SoNode#getByName(bf62e009e5fb797f).("dirLightEditorRotatorActive"cxx . . $ SbName#SbName(85c52e162fed56f9).)); |
| 250 | |
| 251 | // Set the other parts to NULL |
| 252 | SoSeparatorcxx . . $ SoSeparator# *dummySep = new SoSeparatorcxx . . $ SoSeparator#SoSeparator(49f6e7a06ebc5aa8).; |
| 253 | dummySep->refcxx . . $ SoBase#ref(83f5f38750778ac8).(); |
| 254 | liteDragger->setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).("translator.xTranslator.translator"cxx . . $ SbName#SbName(85c52e162fed56f9)., dummySep); |
| 255 | liteDragger->setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).("translator.yTranslator.translator"cxx . . $ SbName#SbName(85c52e162fed56f9)., dummySep); |
| 256 | liteDragger->setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).("translator.zTranslator.translator"cxx . . $ SbName#SbName(85c52e162fed56f9)., dummySep); |
| 257 | liteDragger->setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).("translator.xTranslator.translatorActive"cxx . . $ SbName#SbName(85c52e162fed56f9)., dummySep); |
| 258 | liteDragger->setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).("translator.yTranslator.translatorActive"cxx . . $ SbName#SbName(85c52e162fed56f9)., dummySep); |
| 259 | liteDragger->setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).("translator.zTranslator.translatorActive"cxx . . $ SbName#SbName(85c52e162fed56f9)., dummySep); |
| 260 | liteDragger->setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).("translator.yzTranslator.translator"cxx . . $ SbName#SbName(85c52e162fed56f9)., dummySep); |
| 261 | liteDragger->setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).("translator.xzTranslator.translator"cxx . . $ SbName#SbName(85c52e162fed56f9)., dummySep); |
| 262 | liteDragger->setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).("translator.xyTranslator.translator"cxx . . $ SbName#SbName(85c52e162fed56f9)., dummySep); |
| 263 | liteDragger->setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).("translator.yzTranslator.translatorActive"cxx . . $ SbName#SbName(85c52e162fed56f9)., dummySep); |
| 264 | liteDragger->setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).("translator.xzTranslator.translatorActive"cxx . . $ SbName#SbName(85c52e162fed56f9)., dummySep); |
| 265 | liteDragger->setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).("translator.xyTranslator.translatorActive"cxx . . $ SbName#SbName(85c52e162fed56f9)., dummySep); |
| 266 | liteDragger->setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).("rotator.feedback"cxx . . $ SbName#SbName(85c52e162fed56f9)., dummySep); |
| 267 | liteDragger->setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).("rotator.feedbackActive"cxx . . $ SbName#SbName(85c52e162fed56f9)., dummySep); |
| 268 | dummySep->unrefcxx . . $ SoBase#unref(83f5f38750778ac8).(); |
| 269 | |
| 270 | liteDragger->addValueChangedCallbackcxx . . $ SoDragger#addValueChangedCallback(5d3f11b67c4aec04).( |
| 271 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor#::dirLightManipCBcxx . . $ SoXtDirectionalLightEditor#dirLightManipCB(7027446dc0b7318f)., this); |
| 272 | |
| 273 | // NULL out components. They'll be created in buildWidget(). |
| 274 | colorEditorcxx . . $ SoXtDirectionalLightEditor#colorEditor. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 275 | intensitySlidercxx . . $ SoXtDirectionalLightEditor#intensitySlider. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 276 | renderAreacxx . . $ SoXtDirectionalLightEditor#renderArea. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 277 | |
| 278 | |
| 279 | // Callbacks |
| 280 | ignoreCallbackcxx . . $ SoXtDirectionalLightEditor#ignoreCallback. = FALSEcxx . . $ `<external>/3673480128541058774/Intrinsic.h:110:9`!; |
| 281 | |
| 282 | // set up the light sensor |
| 283 | // this tells us if someone else changed the light |
| 284 | lightSensorcxx . . $ SoXtDirectionalLightEditor#lightSensor. = new SoNodeSensorcxx . . $ SoNodeSensor#SoNodeSensor(49f6e7a06ebc5aa8).; |
| 285 | lightSensorcxx . . $ SoXtDirectionalLightEditor#lightSensor.->setFunctioncxx . . $ SoSensor#setFunction(4afb51d7dcffb1c6).((void (*)(void *, SoSensorcxx . . $ SoSensor# *)) |
| 286 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor#::lightSensorCBcxx . . $ SoXtDirectionalLightEditor#lightSensorCB(385f44349f4d8adf).); |
| 287 | lightSensorcxx . . $ SoXtDirectionalLightEditor#lightSensor.->setDatacxx . . $ SoSensor#setData(5d22bdacc48458e8).((void *) this); |
| 288 | |
| 289 | // set up the camera sensor - this will keep our camera oriented to |
| 290 | // match the scene the light is in. |
| 291 | cameraSensorcxx . . $ SoXtDirectionalLightEditor#cameraSensor. = new SoNodeSensorcxx . . $ SoNodeSensor#SoNodeSensor(49f6e7a06ebc5aa8).; |
| 292 | cameraSensorcxx . . $ SoXtDirectionalLightEditor#cameraSensor.->setFunctioncxx . . $ SoSensor#setFunction(4afb51d7dcffb1c6).((void (*)(void *, SoSensorcxx . . $ SoSensor# *)) |
| 293 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor#::cameraSensorCBcxx . . $ SoXtDirectionalLightEditor#cameraSensorCB(385f44349f4d8adf).); |
| 294 | cameraSensorcxx . . $ SoXtDirectionalLightEditor#cameraSensor.->setDatacxx . . $ SoSensor#setData(5d22bdacc48458e8).((void *) this); |
| 295 | cameraToWatchcxx . . $ SoXtDirectionalLightEditor#cameraToWatch. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 296 | |
| 297 | // Local scene graph for direct manipulation |
| 298 | rootcxx . . $ SoXtDirectionalLightEditor#root. = new SoSeparatorcxx . . $ SoSeparator#SoSeparator(49f6e7a06ebc5aa8).; |
| 299 | myCameracxx . . $ SoXtDirectionalLightEditor#myCamera. = new SoPerspectiveCameracxx . . $ SoPerspectiveCamera#SoPerspectiveCamera(49f6e7a06ebc5aa8).; |
| 300 | litStuffcxx . . $ SoXtDirectionalLightEditor#litStuff. = new SoSeparatorcxx . . $ SoSeparator#SoSeparator(49f6e7a06ebc5aa8).; |
| 301 | SoEnvironmentcxx . . $ SoEnvironment# *environ = new SoEnvironmentcxx . . $ SoEnvironment#; |
| 302 | SoMaterialcxx . . $ SoMaterial# *material = new SoMaterialcxx . . $ SoMaterial#; |
| 303 | SoComplexitycxx . . $ SoComplexity# *complexity = new SoComplexitycxx . . $ SoComplexity#; |
| 304 | SoSpherecxx . . $ SoSphere# *sphere = new SoSpherecxx . . $ SoSphere#; |
| 305 | litStuffcxx . . $ SoXtDirectionalLightEditor#litStuff.->addChildcxx . . $ SoGroup#addChild(da6c7544ccee32bd).(environ); |
| 306 | litStuffcxx . . $ SoXtDirectionalLightEditor#litStuff.->addChildcxx . . $ SoGroup#addChild(da6c7544ccee32bd).(material); |
| 307 | litStuffcxx . . $ SoXtDirectionalLightEditor#litStuff.->addChildcxx . . $ SoGroup#addChild(da6c7544ccee32bd).(complexity); |
| 308 | litStuffcxx . . $ SoXtDirectionalLightEditor#litStuff.->addChildcxx . . $ SoGroup#addChild(da6c7544ccee32bd).(sphere); |
| 309 | litStuffcxx . . $ SoXtDirectionalLightEditor#litStuff.->renderCachingcxx . . $ SoSeparator#renderCaching. =cxx . . $ SoSFEnum#`operator=`(7864480464b09eea). SoSeparatorcxx . . $ SoSeparator#::AUTOcxx . . $ SoSeparator#AUTO.; |
| 310 | |
| 311 | rootcxx . . $ SoXtDirectionalLightEditor#root.->refcxx . . $ SoBase#ref(83f5f38750778ac8).(); |
| 312 | rootcxx . . $ SoXtDirectionalLightEditor#root.->addChildcxx . . $ SoGroup#addChild(da6c7544ccee32bd).(myCameracxx . . $ SoXtDirectionalLightEditor#myCamera.); |
| 313 | rootcxx . . $ SoXtDirectionalLightEditor#root.->addChildcxx . . $ SoGroup#addChild(da6c7544ccee32bd).(dirLightManipcxx . . $ SoXtDirectionalLightEditor#dirLightManip.); |
| 314 | rootcxx . . $ SoXtDirectionalLightEditor#root.->addChildcxx . . $ SoGroup#addChild(da6c7544ccee32bd).(litStuffcxx . . $ SoXtDirectionalLightEditor#litStuff.); |
| 315 | |
| 316 | // some ambient light |
| 317 | environ->ambientColorcxx . . $ SoEnvironment#ambientColor..setValuecxx . . $ SoSFColor#setValue(bd1040fe176e0786).(1.0, 1.0, 1.0); |
| 318 | environ->ambientIntensitycxx . . $ SoEnvironment#ambientIntensity..setValuecxx . . $ SoSFFloat#setValue(9364e6e7bff7660).(0.5); |
| 319 | |
| 320 | // let's have an interesting material! |
| 321 | material->ambientColorcxx . . $ SoMaterial#ambientColor..setValuecxx . . $ SoMFColor#setValue(bd1040fe176e0786).(.2, .2, .2); |
| 322 | material->diffuseColorcxx . . $ SoMaterial#diffuseColor..setValuecxx . . $ SoMFColor#setValue(bd1040fe176e0786).(.55, .55, .55); |
| 323 | material->specularColorcxx . . $ SoMaterial#specularColor..setValuecxx . . $ SoMFColor#setValue(bd1040fe176e0786).(.70, .70, .70); |
| 324 | material->shininesscxx . . $ SoMaterial#shininess..setValuecxx . . $ SoMFFloat#setValue(9364e6e7bff7660).(1.0); |
| 325 | |
| 326 | // and some complexity |
| 327 | complexity->valuecxx . . $ SoComplexity#value..setValuecxx . . $ SoSFFloat#setValue(9364e6e7bff7660).(0.6); |
| 328 | |
| 329 | // Build the widget tree, and let SoXtComponent know about our base widget. |
| 330 | if (buildNow) { |
| 331 | Widgetcxx . . $ Widget# w = buildWidgetcxx . . $ SoXtDirectionalLightEditor#buildWidget(a686be44a4028679).(getParentWidgetcxx . . $ SoXtComponent#getParentWidget(24ba213de9f943e3).()); |
| 332 | setBaseWidgetcxx . . $ SoXtComponent#setBaseWidget(cfa999c5a14729dd).(w); |
| 333 | } |
| 334 | } |
| 335 | |
| 336 | |
| 337 | //////////////////////////////////////////////////////////////////////// |
| 338 | // |
| 339 | // Destructor. |
| 340 | // |
| 341 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor#::~cxx . . $ SoXtDirectionalLightEditor#`~SoXtDirectionalLightEditor`(49f6e7a06ebc5aa8).SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor#() |
| 342 | // |
| 343 | //////////////////////////////////////////////////////////////////////// |
| 344 | { |
| 345 | if (isAttachedcxx . . $ SoXtDirectionalLightEditor#isAttached(b126dc7c1de90089).()) |
| 346 | detachcxx . . $ SoXtDirectionalLightEditor#detach(49f6e7a06ebc5aa8).(); |
| 347 | |
| 348 | delete callbackListcxx . . $ SoXtDirectionalLightEditor#callbackList.; |
| 349 | delete colorEditorcxx . . $ SoXtDirectionalLightEditor#colorEditor.; |
| 350 | delete intensitySlidercxx . . $ SoXtDirectionalLightEditor#intensitySlider.; |
| 351 | delete renderAreacxx . . $ SoXtDirectionalLightEditor#renderArea.; |
| 352 | rootcxx . . $ SoXtDirectionalLightEditor#root.->unrefcxx . . $ SoBase#unref(83f5f38750778ac8).(); |
| 353 | dirLightManipcxx . . $ SoXtDirectionalLightEditor#dirLightManip.->unrefcxx . . $ SoBase#unref(83f5f38750778ac8).(); |
| 354 | delete clipboardcxx . . $ SoXtDirectionalLightEditor#clipboard.; |
| 355 | } |
| 356 | |
| 357 | void |
| 358 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor#::showcxx . . $ SoXtDirectionalLightEditor#show(49f6e7a06ebc5aa8).() |
| 359 | { |
| 360 | SoXtComponentcxx . . $ SoXtComponent#::showcxx . . $ SoXtComponent#show(49f6e7a06ebc5aa8).(); |
| 361 | |
| 362 | // now also show the other components if there were previously shown |
| 363 | if (colorEditorcxx . . $ SoXtDirectionalLightEditor#colorEditor. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! && colorEditorcxx . . $ SoXtDirectionalLightEditor#colorEditor.->getWidgetcxx . . $ SoXtComponent#getWidget(24ba213de9f943e3).() != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) |
| 364 | colorEditorcxx . . $ SoXtDirectionalLightEditor#colorEditor.->showcxx . . $ SoXtComponent#show(49f6e7a06ebc5aa8).(); |
| 365 | } |
| 366 | |
| 367 | void |
| 368 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor#::hidecxx . . $ SoXtDirectionalLightEditor#hide(49f6e7a06ebc5aa8).() |
| 369 | { |
| 370 | SoXtComponentcxx . . $ SoXtComponent#::hidecxx . . $ SoXtComponent#hide(49f6e7a06ebc5aa8).(); |
| 371 | if (colorEditorcxx . . $ SoXtDirectionalLightEditor#colorEditor. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) |
| 372 | colorEditorcxx . . $ SoXtDirectionalLightEditor#colorEditor.->hidecxx . . $ SoXtComponent#hide(49f6e7a06ebc5aa8).(); |
| 373 | } |
| 374 | |
| 375 | //////////////////////////////////////////////////////////////////////// |
| 376 | // |
| 377 | // This builds the pulldown menu for the dir light editor. |
| 378 | // |
| 379 | // usage: private |
| 380 | // |
| 381 | Widgetcxx . . $ Widget# |
| 382 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor#::buildPulldownMenucxx . . $ SoXtDirectionalLightEditor#buildPulldownMenu(a686be44a4028679).(Widgetcxx . . $ Widget# parent) |
| 383 | // |
| 384 | //////////////////////////////////////////////////////////////////////// |
| 385 | { |
| 386 | Widgetcxx . . $ Widget# menubar, pulldown, buttons[1]; |
| 387 | Argcxx . . $ Arg# args[5]; |
| 388 | int n; |
| 389 | Widgetcxx . . $ Widget# menuW[20]; |
| 390 | int num = 0; |
| 391 | |
| 392 | menubar = XmCreateMenuBar(parent, "menuBar", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, 0); |
| 393 | |
| 394 | pulldown = XmCreatePulldownMenu(menubar, "controlPulldown", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, 0); |
| 395 | |
| 396 | n = 0; |
| 397 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!(args[n], XmNsubMenuIdcxx . . $ `<external>/427401153941432933/XmStrDefs.h:3408:9`!, pulldown); n++; |
| 398 | buttons[0] = XtCreateWidget("Edit", |
| 399 | xmCascadeButtonGadgetClass, menubar, args, n); |
| 400 | |
| 401 | n = 0; |
| 402 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!(args[n], XmNuserDatacxx . . $ `<external>/427401153941432933/XmStrDefs.h:3525:9`!, this); n++; |
| 403 | |
| 404 | #define PUSH_ITEMcxx . . $ `libSoXt/src/lightEditor/SoXtDirLitEd.c++:404:9`!(NAME,KONST) \ |
| 405 | menuW[num] = XtCreateWidget(NAME, \ |
| 406 | xmPushButtonGadgetClass, pulldown, args, n); \ |
| 407 | XtAddCallback(menuW[num], XmNactivateCallbackcxx . . $ `<external>/427401153941432933/XmStrDefs.h:2349:9`!,\ |
| 408 | (XtCallbackProc) SoXtDirectionalLightEditor::menuPick, \ |
| 409 | (XtPointer) KONST); \ |
| 410 | num++; |
| 411 | |
| 412 | PUSH_ITEMcxx . . $ `libSoXt/src/lightEditor/SoXtDirLitEd.c++:404:9`!("Color Editor", k_COLOR_EDITOR) |
| 413 | |
| 414 | menuW[num++] = XtCreateWidget("separator", |
| 415 | xmSeparatorGadgetClass, pulldown, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, 0); |
| 416 | |
| 417 | PUSH_ITEMcxx . . $ `libSoXt/src/lightEditor/SoXtDirLitEd.c++:404:9`!("Copy", k_COPY) |
| 418 | PUSH_ITEMcxx . . $ `libSoXt/src/lightEditor/SoXtDirLitEd.c++:404:9`!("Paste", k_PASTE) |
| 419 | |
| 420 | menuW[num++] = XtCreateWidget("separator", |
| 421 | xmSeparatorGadgetClass, pulldown, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, 0); |
| 422 | |
| 423 | PUSH_ITEMcxx . . $ `libSoXt/src/lightEditor/SoXtDirLitEd.c++:404:9`!("Help", k_HELP) |
| 424 | #undef PUSH_ITEMcxx . . $ `libSoXt/src/lightEditor/SoXtDirLitEd.c++:404:9`! |
| 425 | |
| 426 | // manage children |
| 427 | XtManageChildren(menuW, num); |
| 428 | XtManageChildren(buttons, 1); |
| 429 | |
| 430 | return menubar; |
| 431 | } |
| 432 | |
| 433 | //////////////////////////////////////////////////////////////////////// |
| 434 | // |
| 435 | // This routine builds all the widgets, sets up callback routines, |
| 436 | // and does the layout using motif. |
| 437 | // |
| 438 | // usage: virtual public |
| 439 | // |
| 440 | Widgetcxx . . $ Widget# |
| 441 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor#::buildWidgetcxx . . $ SoXtDirectionalLightEditor#buildWidget(a686be44a4028679).(Widgetcxx . . $ Widget# parent) |
| 442 | // |
| 443 | //////////////////////////////////////////////////////////////////////// |
| 444 | { |
| 445 | Widgetcxx . . $ Widget# menubar; |
| 446 | int n; |
| 447 | Argcxx . . $ Arg# args[10]; |
| 448 | |
| 449 | // get resources... |
| 450 | SoXtResourcecxx . . $ SoXtResource# xrcxx . . $ SoXtResource#SoXtResource(cfa999c5a14729dd).(parent); |
| 451 | if (!xr.getResourcecxx . . $ SoXtResource#getResource(982bcb294f844ec2).( "inten", "Inten", rlcxx . . $ rl..intencxx . . $ $anonymous_type_d1403f92c690a67f_1#inten. )) |
| 452 | rlcxx . . $ rl..intencxx . . $ $anonymous_type_d1403f92c690a67f_1#inten. = defaultscxx . . $ defaults.[0]; |
| 453 | |
| 454 | // |
| 455 | // create a top level form to hold everything together |
| 456 | // |
| 457 | SbVec2scxx . . $ SbVec2s# size = getSizecxx . . $ SoXtComponent#getSize(2f646538a2980851).(); |
| 458 | n = 0; |
| 459 | if ((size[cxx . . $ SbVec2s#`operator[]`(3a1bfc038f5ec6).0] != 0) && (size[cxx . . $ SbVec2s#`operator[]`(3a1bfc038f5ec6).1] != 0)) { |
| 460 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!(args[n], XtNwidthcxx . . $ `<external>/1418573538627700912/StringDefs.h:564:9`!, size[0]); n++; |
| 461 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!(args[n], XtNheightcxx . . $ `<external>/1418573538627700912/StringDefs.h:384:9`!, size[1]); n++; |
| 462 | } |
| 463 | |
| 464 | // build the topmost widget |
| 465 | Widgetcxx . . $ Widget# widget = XtCreateWidget(getWidgetNamecxx . . $ SoXtComponent#getWidgetName(a9f41ea0e82d88cf).(), xmFormWidgetClass, parent, args, n); |
| 466 | |
| 467 | // build the subcomponents |
| 468 | intensitySlidercxx . . $ SoXtDirectionalLightEditor#intensitySlider. = new _SoXtColorSlidercxx . . $ _SoXtColorSlider#_SoXtColorSlider(d4ec4607eb729426).(widget, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, TRUEcxx . . $ `<external>/3673480128541058774/Intrinsic.h:111:9`!, _SoXtColorSlidercxx . . $ _SoXtColorSlider#::INTENSITY_SLIDERcxx . . $ _SoXtColorSlider#INTENSITY_SLIDER.); |
| 469 | intensitySlidercxx . . $ SoXtDirectionalLightEditor#intensitySlider.->setLabelcxx . . $ _SoXtSlider#setLabel(85c52e162fed56f9).( rlcxx . . $ rl..intencxx . . $ $anonymous_type_d1403f92c690a67f_1#inten. ); |
| 470 | intensitySlidercxx . . $ SoXtDirectionalLightEditor#intensitySlider.->addValueChangedCallbackcxx . . $ _SoXtSlider#addValueChangedCallback(291e28490367b016).( |
| 471 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor#::intensitySliderCBcxx . . $ SoXtDirectionalLightEditor#intensitySliderCB(314e3af8753aac9e)., this); |
| 472 | |
| 473 | renderAreacxx . . $ SoXtDirectionalLightEditor#renderArea. = new SoXtRenderAreacxx . . $ SoXtRenderArea#SoXtRenderArea(1eaf1a16d3aa15cc).(widget); |
| 474 | renderAreacxx . . $ SoXtDirectionalLightEditor#renderArea.->setSceneGraphcxx . . $ SoXtRenderArea#setSceneGraph(da6c7544ccee32bd).(rootcxx . . $ SoXtDirectionalLightEditor#root.); |
| 475 | myCameracxx . . $ SoXtDirectionalLightEditor#myCamera.->viewAllcxx . . $ SoCamera#viewAll(aa1d5c094c82e02).(litStuffcxx . . $ SoXtDirectionalLightEditor#litStuff., SbViewportRegioncxx . . $ SbViewportRegion#(renderAreacxx . . $ SoXtDirectionalLightEditor#renderArea.->getSizecxx . . $ SoXtComponent#getSize(2f646538a2980851).()), 2.0); |
| 476 | |
| 477 | menubar = buildPulldownMenucxx . . $ SoXtDirectionalLightEditor#buildPulldownMenu(a686be44a4028679).(widget); |
| 478 | |
| 479 | // Layout |
| 480 | n = 0; |
| 481 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!(args[n], XmNtopAttachmentcxx . . $ `<external>/427401153941432933/XmStrDefs.h:3453:9`!, XmATTACH_FORM); n++; |
| 482 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!(args[n], XmNleftAttachmentcxx . . $ `<external>/427401153941432933/XmStrDefs.h:2898:9`!, XmATTACH_FORM); n++; |
| 483 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!(args[n], XmNrightAttachmentcxx . . $ `<external>/427401153941432933/XmStrDefs.h:3231:9`!, XmATTACH_FORM); n++; |
| 484 | XtSetValues(menubar, args, n); |
| 485 | |
| 486 | n = 0; |
| 487 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!(args[n], XmNleftAttachmentcxx . . $ `<external>/427401153941432933/XmStrDefs.h:2898:9`!, XmATTACH_FORM); n++; |
| 488 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!(args[n], XmNrightAttachmentcxx . . $ `<external>/427401153941432933/XmStrDefs.h:3231:9`!, XmATTACH_FORM); n++; |
| 489 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!(args[n], XmNtopAttachmentcxx . . $ `<external>/427401153941432933/XmStrDefs.h:3453:9`!, XmATTACH_WIDGET); n++; |
| 490 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!(args[n], XmNtopWidgetcxx . . $ `<external>/427401153941432933/XmStrDefs.h:3480:9`!, menubar); n++; |
| 491 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!(args[n], XmNbottomAttachmentcxx . . $ `<external>/427401153941432933/XmStrDefs.h:2424:9`!, XmATTACH_POSITION); n++; |
| 492 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!(args[n], XmNbottomPositioncxx . . $ `<external>/427401153941432933/XmStrDefs.h:2430:9`!, 90); n++; |
| 493 | XtSetValues(renderAreacxx . . $ SoXtDirectionalLightEditor#renderArea.->getWidgetcxx . . $ SoXtComponent#getWidget(24ba213de9f943e3).(), args, n); |
| 494 | |
| 495 | n = 0; |
| 496 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!(args[n], XmNbottomAttachmentcxx . . $ `<external>/427401153941432933/XmStrDefs.h:2424:9`!, XmATTACH_FORM); n++; |
| 497 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!(args[n], XmNleftAttachmentcxx . . $ `<external>/427401153941432933/XmStrDefs.h:2898:9`!, XmATTACH_FORM); n++; |
| 498 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!(args[n], XmNrightAttachmentcxx . . $ `<external>/427401153941432933/XmStrDefs.h:3231:9`!, XmATTACH_FORM); n++; |
| 499 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!(args[n], XmNtopAttachmentcxx . . $ `<external>/427401153941432933/XmStrDefs.h:3453:9`!, XmATTACH_WIDGET); n++; |
| 500 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!(args[n], XmNtopWidgetcxx . . $ `<external>/427401153941432933/XmStrDefs.h:3480:9`!, renderArea->getWidget()); n++; |
| 501 | XtSetValues(intensitySlidercxx . . $ SoXtDirectionalLightEditor#intensitySlider.->getWidgetcxx . . $ SoXtComponent#getWidget(24ba213de9f943e3).(), args, n); |
| 502 | |
| 503 | // manage those children |
| 504 | XtManageChild(menubar); |
| 505 | renderAreacxx . . $ SoXtDirectionalLightEditor#renderArea.->showcxx . . $ SoXtComponent#show(49f6e7a06ebc5aa8).(); |
| 506 | intensitySlidercxx . . $ SoXtDirectionalLightEditor#intensitySlider.->showcxx . . $ SoXtComponent#show(49f6e7a06ebc5aa8).(); |
| 507 | |
| 508 | // the intensity slider should reflect the current RGB color |
| 509 | ignoreCallbackcxx . . $ SoXtDirectionalLightEditor#ignoreCallback. = TRUEcxx . . $ `<external>/3673480128541058774/Intrinsic.h:111:9`!; |
| 510 | intensitySlidercxx . . $ SoXtDirectionalLightEditor#intensitySlider.->setBaseColorcxx . . $ _SoXtColorSlider#setBaseColor(de58861cad56015a).(dirLightManipcxx . . $ SoXtDirectionalLightEditor#dirLightManip.->colorcxx . . $ SoLight#color..getValuecxx . . $ SoSFColor#getValue(d23318ddecff63dd).().getValuecxx . . $ SbVec3f#getValue(d64004c6a662f6a6).()); |
| 511 | ignoreCallbackcxx . . $ SoXtDirectionalLightEditor#ignoreCallback. = FALSEcxx . . $ `<external>/3673480128541058774/Intrinsic.h:110:9`!; |
| 512 | |
| 513 | return widget; |
| 514 | } |
| 515 | |
| 516 | |
| 517 | //////////////////////////////////////////////////////////////////////// |
| 518 | // |
| 519 | // This routine attaches itself to a single color field. |
| 520 | // |
| 521 | // usage: public |
| 522 | // |
| 523 | void |
| 524 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor#::attachcxx . . $ SoXtDirectionalLightEditor#attach(eed4dbbaf0eca0f1).(SoPathcxx . . $ SoPath# *pathToLight ) |
| 525 | // |
| 526 | //////////////////////////////////////////////////////////////////////// |
| 527 | { |
| 528 | if (isAttachedcxx . . $ SoXtDirectionalLightEditor#isAttached(b126dc7c1de90089).()) |
| 529 | detachcxx . . $ SoXtDirectionalLightEditor#detach(49f6e7a06ebc5aa8).(); |
| 530 | |
| 531 | if ( pathToLight == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) |
| 532 | return; |
| 533 | |
| 534 | pathToLight->refcxx . . $ SoBase#ref(83f5f38750778ac8).(); |
| 535 | SoFullPathcxx . . $ SoFullPath# *fullPathToLight = (SoFullPathcxx . . $ SoFullPath# *) pathToLight; |
| 536 | |
| 537 | if ( fullPathToLight->getTailcxx . . $ SoFullPath#getTail(b794963b450d51b3).()->isOfTypecxx . . $ SoBase#isOfType(1fd66475a268b64e).( |
| 538 | SoDirectionalLightcxx . . $ SoDirectionalLight#::getClassTypeIdcxx . . $ SoDirectionalLight#getClassTypeId(c00c150378d2b968).() ) ) { |
| 539 | |
| 540 | dirLightcxx . . $ SoXtDirectionalLightEditor#dirLight. = (SoDirectionalLightcxx . . $ SoDirectionalLight# *) fullPathToLight->getTailcxx . . $ SoFullPath#getTail(b794963b450d51b3).(); |
| 541 | dirLightcxx . . $ SoXtDirectionalLightEditor#dirLight.->refcxx . . $ SoBase#ref(83f5f38750778ac8).(); |
| 542 | |
| 543 | // set values in dirLightManip |
| 544 | ignoreCallbackcxx . . $ SoXtDirectionalLightEditor#ignoreCallback. = TRUEcxx . . $ `<external>/3673480128541058774/Intrinsic.h:111:9`!; // ignore resulting manip callback |
| 545 | copyLightcxx . . $ SoXtDirectionalLightEditor#copyLight(7b804236aabc6987).(dirLightManipcxx . . $ SoXtDirectionalLightEditor#dirLightManip., dirLightcxx . . $ SoXtDirectionalLightEditor#dirLight.); // dst,src |
| 546 | ignoreCallbackcxx . . $ SoXtDirectionalLightEditor#ignoreCallback. = FALSEcxx . . $ `<external>/3673480128541058774/Intrinsic.h:110:9`!; |
| 547 | |
| 548 | // If the path contains a camera, put a sensor on camera, |
| 549 | // to keep our view the same as the |
| 550 | // view of the light |
| 551 | SoSearchActioncxx . . $ SoSearchAction# sacxx . . $ SoSearchAction#SoSearchAction(49f6e7a06ebc5aa8).; |
| 552 | sa.setTypecxx . . $ SoSearchAction#setType(a368ce5ca5a50910).( SoCameracxx . . $ SoCamera#::getClassTypeIdcxx . . $ SoCamera#getClassTypeId(c00c150378d2b968).() ); |
| 553 | sa.applycxx . . $ SoAction#apply(eed4dbbaf0eca0f1).( fullPathToLight ); |
| 554 | if ( sa.getPathcxx . . $ SoSearchAction#getPath(58db5280b30558ed).() != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { |
| 555 | cameraToWatchcxx . . $ SoXtDirectionalLightEditor#cameraToWatch. = (SoCameracxx . . $ SoCamera# *)((SoFullPathcxx . . $ SoFullPath# *)sa.getPathcxx . . $ SoSearchAction#getPath(58db5280b30558ed).())->getTailcxx . . $ SoFullPath#getTail(b794963b450d51b3).(); |
| 556 | cameraToWatchcxx . . $ SoXtDirectionalLightEditor#cameraToWatch.->refcxx . . $ SoBase#ref(83f5f38750778ac8).(); |
| 557 | cameraSensorCBcxx . . $ SoXtDirectionalLightEditor#cameraSensorCB(385f44349f4d8adf).( this, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ); |
| 558 | } |
| 559 | else { |
| 560 | // Otherwise, set camera to original place. |
| 561 | if ( cameraToWatchcxx . . $ SoXtDirectionalLightEditor#cameraToWatch. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) |
| 562 | cameraToWatchcxx . . $ SoXtDirectionalLightEditor#cameraToWatch.->unrefcxx . . $ SoBase#unref(83f5f38750778ac8).(); |
| 563 | cameraToWatchcxx . . $ SoXtDirectionalLightEditor#cameraToWatch. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 564 | // put the camera back to the origin... |
| 565 | myCameracxx . . $ SoXtDirectionalLightEditor#myCamera.->orientationcxx . . $ SoCamera#orientation..setValuecxx . . $ SoSFRotation#setValue(7e9a355db6148521).( 0, 0, 0, 1 ); |
| 566 | myCameracxx . . $ SoXtDirectionalLightEditor#myCamera.->positioncxx . . $ SoCamera#position..setValuecxx . . $ SoSFVec3f#setValue(bd1040fe176e0786).( 0, 0, 0 ); |
| 567 | |
| 568 | if (renderAreacxx . . $ SoXtDirectionalLightEditor#renderArea. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) { |
| 569 | myCameracxx . . $ SoXtDirectionalLightEditor#myCamera.->viewAllcxx . . $ SoCamera#viewAll(aa1d5c094c82e02).(litStuffcxx . . $ SoXtDirectionalLightEditor#litStuff., |
| 570 | SbViewportRegioncxx . . $ SbViewportRegion#(renderAreacxx . . $ SoXtDirectionalLightEditor#renderArea.->getSizecxx . . $ SoXtComponent#getSize(2f646538a2980851).()), |
| 571 | 2.0); // slack = 2.0 |
| 572 | } |
| 573 | } |
| 574 | |
| 575 | if (isVisiblecxx . . $ SoXtComponent#isVisible(b126dc7c1de90089).()) |
| 576 | activatecxx . . $ SoXtDirectionalLightEditor#activate(49f6e7a06ebc5aa8).(); |
| 577 | } |
| 578 | pathToLight->unrefcxx . . $ SoBase#unref(83f5f38750778ac8).(); |
| 579 | } |
| 580 | |
| 581 | |
| 582 | //////////////////////////////////////////////////////////////////////// |
| 583 | // |
| 584 | // This routine detaches itself from the color field. |
| 585 | // |
| 586 | // usage: public |
| 587 | |
| 588 | void |
| 589 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor#::detachcxx . . $ SoXtDirectionalLightEditor#detach(49f6e7a06ebc5aa8).() |
| 590 | // |
| 591 | //////////////////////////////////////////////////////////////////////// |
| 592 | { |
| 593 | if (isAttachedcxx . . $ SoXtDirectionalLightEditor#isAttached(b126dc7c1de90089).()) { |
| 594 | deactivatecxx . . $ SoXtDirectionalLightEditor#deactivate(49f6e7a06ebc5aa8).(); |
| 595 | if ( cameraToWatchcxx . . $ SoXtDirectionalLightEditor#cameraToWatch. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { |
| 596 | cameraToWatchcxx . . $ SoXtDirectionalLightEditor#cameraToWatch.->unrefcxx . . $ SoBase#unref(83f5f38750778ac8).(); |
| 597 | cameraToWatchcxx . . $ SoXtDirectionalLightEditor#cameraToWatch. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 598 | } |
| 599 | |
| 600 | dirLightcxx . . $ SoXtDirectionalLightEditor#dirLight.->unrefcxx . . $ SoBase#unref(83f5f38750778ac8).(); |
| 601 | dirLightcxx . . $ SoXtDirectionalLightEditor#dirLight. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 602 | } |
| 603 | } |
| 604 | |
| 605 | //////////////////////////////////////////////////////////////////////// |
| 606 | // |
| 607 | // Callback routine from the color editor, this changes the color |
| 608 | // of the light node we are attached to. |
| 609 | // |
| 610 | // usage: static, private |
| 611 | // |
| 612 | void |
| 613 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor#::colorEditorCBcxx . . $ SoXtDirectionalLightEditor#colorEditorCB(a23719629555fa40).( |
| 614 | void *p, |
| 615 | const SbColorcxx . . $ SbColor# *rgb) |
| 616 | // |
| 617 | //////////////////////////////////////////////////////////////////////// |
| 618 | { |
| 619 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor# *editor = (SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor# *)p; |
| 620 | |
| 621 | if (editor->ignoreCallbackcxx . . $ SoXtDirectionalLightEditor#ignoreCallback.) |
| 622 | return; |
| 623 | |
| 624 | if (editor->dirLightcxx . . $ SoXtDirectionalLightEditor#dirLight. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) { |
| 625 | // detach the sensor while we update the field |
| 626 | editor->lightSensorcxx . . $ SoXtDirectionalLightEditor#lightSensor.->detachcxx . . $ SoNodeSensor#detach(49f6e7a06ebc5aa8).(); |
| 627 | editor->dirLightcxx . . $ SoXtDirectionalLightEditor#dirLight.->colorcxx . . $ SoLight#color..setValuecxx . . $ SoSFColor#setValue(fad0b7baf6bfdbd3).(*rgb); |
| 628 | editor->lightSensorcxx . . $ SoXtDirectionalLightEditor#lightSensor.->attachcxx . . $ SoNodeSensor#attach(da6c7544ccee32bd).(editor->dirLightcxx . . $ SoXtDirectionalLightEditor#dirLight.); |
| 629 | } |
| 630 | |
| 631 | // update the intensity to reflect the color |
| 632 | editor->ignoreCallbackcxx . . $ SoXtDirectionalLightEditor#ignoreCallback. = TRUEcxx . . $ `<external>/3673480128541058774/Intrinsic.h:111:9`!; |
| 633 | editor->intensitySlidercxx . . $ SoXtDirectionalLightEditor#intensitySlider.->setBaseColorcxx . . $ _SoXtColorSlider#setBaseColor(de58861cad56015a).(rgb->getValuecxx . . $ SbVec3f#getValue(d64004c6a662f6a6).()); |
| 634 | editor->ignoreCallbackcxx . . $ SoXtDirectionalLightEditor#ignoreCallback. = FALSEcxx . . $ `<external>/3673480128541058774/Intrinsic.h:110:9`!; |
| 635 | |
| 636 | // update our local light |
| 637 | editor->ignoreCallbackcxx . . $ SoXtDirectionalLightEditor#ignoreCallback. = TRUEcxx . . $ `<external>/3673480128541058774/Intrinsic.h:111:9`!; // ignore resulting manip callback |
| 638 | editor->dirLightManipcxx . . $ SoXtDirectionalLightEditor#dirLightManip.->colorcxx . . $ SoLight#color..setValuecxx . . $ SoSFColor#setValue(fad0b7baf6bfdbd3).(*rgb); |
| 639 | editor->ignoreCallbackcxx . . $ SoXtDirectionalLightEditor#ignoreCallback. = FALSEcxx . . $ `<external>/3673480128541058774/Intrinsic.h:110:9`!; |
| 640 | |
| 641 | // invoke the callbacks with the new values |
| 642 | editor->callbackListcxx . . $ SoXtDirectionalLightEditor#callbackList.->invokeCallbackscxx . . $ SoCallbackList#invokeCallbacks(5d22bdacc48458e8).(editor->dirLightManipcxx . . $ SoXtDirectionalLightEditor#dirLightManip.); |
| 643 | } |
| 644 | |
| 645 | //////////////////////////////////////////////////////////////////////// |
| 646 | // |
| 647 | // Callback routine from the intensity slider, this changes the |
| 648 | // intensity of the light node we are attached to. |
| 649 | // |
| 650 | // usage: static, private |
| 651 | // |
| 652 | void |
| 653 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor#::intensitySliderCBcxx . . $ SoXtDirectionalLightEditor#intensitySliderCB(314e3af8753aac9e).( |
| 654 | void *p, |
| 655 | float intensity) |
| 656 | // |
| 657 | //////////////////////////////////////////////////////////////////////// |
| 658 | { |
| 659 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor# *editor = (SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor# *)p; |
| 660 | |
| 661 | if (editor->ignoreCallbackcxx . . $ SoXtDirectionalLightEditor#ignoreCallback.) |
| 662 | return; |
| 663 | |
| 664 | if (editor->dirLightcxx . . $ SoXtDirectionalLightEditor#dirLight. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) { |
| 665 | // detach the sensor while we update the field |
| 666 | editor->lightSensorcxx . . $ SoXtDirectionalLightEditor#lightSensor.->detachcxx . . $ SoNodeSensor#detach(49f6e7a06ebc5aa8).(); |
| 667 | editor->dirLightcxx . . $ SoXtDirectionalLightEditor#dirLight.->intensitycxx . . $ SoLight#intensity..setValuecxx . . $ SoSFFloat#setValue(9364e6e7bff7660).(intensity); |
| 668 | editor->lightSensorcxx . . $ SoXtDirectionalLightEditor#lightSensor.->attachcxx . . $ SoNodeSensor#attach(da6c7544ccee32bd).(editor->dirLightcxx . . $ SoXtDirectionalLightEditor#dirLight.); |
| 669 | } |
| 670 | |
| 671 | // update our local light |
| 672 | editor->ignoreCallbackcxx . . $ SoXtDirectionalLightEditor#ignoreCallback. = TRUEcxx . . $ `<external>/3673480128541058774/Intrinsic.h:111:9`!; // ignore resulting manip callback |
| 673 | editor->dirLightManipcxx . . $ SoXtDirectionalLightEditor#dirLightManip.->intensitycxx . . $ SoLight#intensity..setValuecxx . . $ SoSFFloat#setValue(9364e6e7bff7660).(intensity); |
| 674 | editor->ignoreCallbackcxx . . $ SoXtDirectionalLightEditor#ignoreCallback. = FALSEcxx . . $ `<external>/3673480128541058774/Intrinsic.h:110:9`!; |
| 675 | |
| 676 | // invoke the callbacks with the new values |
| 677 | editor->callbackListcxx . . $ SoXtDirectionalLightEditor#callbackList.->invokeCallbackscxx . . $ SoCallbackList#invokeCallbacks(5d22bdacc48458e8).(editor->dirLightManipcxx . . $ SoXtDirectionalLightEditor#dirLightManip.); |
| 678 | } |
| 679 | |
| 680 | |
| 681 | //////////////////////////////////////////////////////////////////////// |
| 682 | // |
| 683 | // Update the editor components based on the values of dirLightManip. |
| 684 | // |
| 685 | // Use: private |
| 686 | // |
| 687 | void |
| 688 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor#::updateLocalComponentscxx . . $ SoXtDirectionalLightEditor#updateLocalComponents(49f6e7a06ebc5aa8).() |
| 689 | // |
| 690 | //////////////////////////////////////////////////////////////////////// |
| 691 | { |
| 692 | if (colorEditorcxx . . $ SoXtDirectionalLightEditor#colorEditor. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) { |
| 693 | ignoreCallbackcxx . . $ SoXtDirectionalLightEditor#ignoreCallback. = TRUEcxx . . $ `<external>/3673480128541058774/Intrinsic.h:111:9`!; |
| 694 | colorEditorcxx . . $ SoXtDirectionalLightEditor#colorEditor.->setColorcxx . . $ _SoXtColorEditor#setColor(fad0b7baf6bfdbd3).(dirLightManipcxx . . $ SoXtDirectionalLightEditor#dirLightManip.->colorcxx . . $ SoLight#color..getValuecxx . . $ SoSFColor#getValue(d23318ddecff63dd).()); |
| 695 | ignoreCallbackcxx . . $ SoXtDirectionalLightEditor#ignoreCallback. = FALSEcxx . . $ `<external>/3673480128541058774/Intrinsic.h:110:9`!; |
| 696 | } |
| 697 | |
| 698 | if (intensitySlidercxx . . $ SoXtDirectionalLightEditor#intensitySlider. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) { |
| 699 | // update the intensity to reflect the color |
| 700 | ignoreCallbackcxx . . $ SoXtDirectionalLightEditor#ignoreCallback. = TRUEcxx . . $ `<external>/3673480128541058774/Intrinsic.h:111:9`!; |
| 701 | intensitySlidercxx . . $ SoXtDirectionalLightEditor#intensitySlider.->setValuecxx . . $ _SoXtSlider#setValue(9364e6e7bff7660).(dirLightManipcxx . . $ SoXtDirectionalLightEditor#dirLightManip.->intensitycxx . . $ SoLight#intensity..getValuecxx . . $ SoSFFloat#getValue(5036dfe8d4170af2).()); |
| 702 | intensitySlidercxx . . $ SoXtDirectionalLightEditor#intensitySlider.->setBaseColorcxx . . $ _SoXtColorSlider#setBaseColor(de58861cad56015a).(dirLightManipcxx . . $ SoXtDirectionalLightEditor#dirLightManip.->colorcxx . . $ SoLight#color..getValuecxx . . $ SoSFColor#getValue(d23318ddecff63dd).().getValuecxx . . $ SbVec3f#getValue(d64004c6a662f6a6).()); |
| 703 | ignoreCallbackcxx . . $ SoXtDirectionalLightEditor#ignoreCallback. = FALSEcxx . . $ `<external>/3673480128541058774/Intrinsic.h:110:9`!; |
| 704 | } |
| 705 | } |
| 706 | |
| 707 | //////////////////////////////////////////////////////////////////////// |
| 708 | // |
| 709 | // Set the values of our local light and the light we are editing. |
| 710 | // |
| 711 | // Use: public |
| 712 | // |
| 713 | void |
| 714 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor#::setLightcxx . . $ SoXtDirectionalLightEditor#setLight(2c02be47c3154506).(const SoDirectionalLightcxx . . $ SoDirectionalLight# &newValues) |
| 715 | // |
| 716 | //////////////////////////////////////////////////////////////////////// |
| 717 | { |
| 718 | if (dirLightcxx . . $ SoXtDirectionalLightEditor#dirLight. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) { |
| 719 | lightSensorcxx . . $ SoXtDirectionalLightEditor#lightSensor.->detachcxx . . $ SoNodeSensor#detach(49f6e7a06ebc5aa8).(); |
| 720 | copyLightcxx . . $ SoXtDirectionalLightEditor#copyLight(7b804236aabc6987).(dirLightcxx . . $ SoXtDirectionalLightEditor#dirLight., &newValues); // dst,src |
| 721 | lightSensorcxx . . $ SoXtDirectionalLightEditor#lightSensor.->attachcxx . . $ SoNodeSensor#attach(da6c7544ccee32bd).(dirLightcxx . . $ SoXtDirectionalLightEditor#dirLight.); |
| 722 | } |
| 723 | |
| 724 | // set values in dirLightManip |
| 725 | ignoreCallbackcxx . . $ SoXtDirectionalLightEditor#ignoreCallback. = TRUEcxx . . $ `<external>/3673480128541058774/Intrinsic.h:111:9`!; // ignore resulting manip callback |
| 726 | copyLightcxx . . $ SoXtDirectionalLightEditor#copyLight(7b804236aabc6987).(dirLightManipcxx . . $ SoXtDirectionalLightEditor#dirLightManip., &newValues); // dst,src |
| 727 | ignoreCallbackcxx . . $ SoXtDirectionalLightEditor#ignoreCallback. = FALSEcxx . . $ `<external>/3673480128541058774/Intrinsic.h:110:9`!; |
| 728 | |
| 729 | // set values in local components (colorEditor, and intensitySlider) |
| 730 | updateLocalComponentscxx . . $ SoXtDirectionalLightEditor#updateLocalComponents(49f6e7a06ebc5aa8).(); |
| 731 | |
| 732 | // invoke the callbacks |
| 733 | callbackListcxx . . $ SoXtDirectionalLightEditor#callbackList.->invokeCallbackscxx . . $ SoCallbackList#invokeCallbacks(5d22bdacc48458e8).(dirLightManipcxx . . $ SoXtDirectionalLightEditor#dirLightManip.); |
| 734 | } |
| 735 | |
| 736 | //////////////////////////////////////////////////////////////////////// |
| 737 | // |
| 738 | // Sensor callback, invoked whenever the dirLight node changes. |
| 739 | // |
| 740 | // Use: private |
| 741 | // |
| 742 | void |
| 743 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor#::lightSensorCBcxx . . $ SoXtDirectionalLightEditor#lightSensorCB(385f44349f4d8adf).(SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor# *editor, |
| 744 | SoSensorcxx . . $ SoSensor# *) |
| 745 | // |
| 746 | //////////////////////////////////////////////////////////////////////// |
| 747 | { |
| 748 | #ifdef DEBUG |
| 749 | // sanity check |
| 750 | if (editor->dirLight == NULL) { |
| 751 | SoDebugError::post("SoXtDirectionalLightEditor::lightSensorCB", |
| 752 | "dirLight is NULL\n"); |
| 753 | return; |
| 754 | } |
| 755 | #endif |
| 756 | |
| 757 | if (!editor->isVisiblecxx . . $ SoXtComponent#isVisible(b126dc7c1de90089).()) |
| 758 | return; |
| 759 | |
| 760 | // set values in dirLightManip |
| 761 | editor->ignoreCallbackcxx . . $ SoXtDirectionalLightEditor#ignoreCallback. = TRUEcxx . . $ `<external>/3673480128541058774/Intrinsic.h:111:9`!; // ignore resulting manip callback |
| 762 | editor->copyLightcxx . . $ SoXtDirectionalLightEditor#copyLight(7b804236aabc6987).(editor->dirLightManipcxx . . $ SoXtDirectionalLightEditor#dirLightManip., editor->dirLightcxx . . $ SoXtDirectionalLightEditor#dirLight.); // dst,src |
| 763 | editor->ignoreCallbackcxx . . $ SoXtDirectionalLightEditor#ignoreCallback. = FALSEcxx . . $ `<external>/3673480128541058774/Intrinsic.h:110:9`!; |
| 764 | |
| 765 | editor->updateLocalComponentscxx . . $ SoXtDirectionalLightEditor#updateLocalComponents(49f6e7a06ebc5aa8).(); |
| 766 | |
| 767 | // invoke the callbacks |
| 768 | editor->callbackListcxx . . $ SoXtDirectionalLightEditor#callbackList.->invokeCallbackscxx . . $ SoCallbackList#invokeCallbacks(5d22bdacc48458e8).(editor->dirLightManipcxx . . $ SoXtDirectionalLightEditor#dirLightManip.); |
| 769 | } |
| 770 | |
| 771 | //////////////////////////////////////////////////////////////////////// |
| 772 | // |
| 773 | // Sensor callback, invoked whenever the cameraToWatch node changes. |
| 774 | // |
| 775 | // Use: private |
| 776 | // |
| 777 | void |
| 778 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor#::cameraSensorCBcxx . . $ SoXtDirectionalLightEditor#cameraSensorCB(385f44349f4d8adf).(SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor# *editor, SoSensorcxx . . $ SoSensor# *) |
| 779 | // |
| 780 | //////////////////////////////////////////////////////////////////////// |
| 781 | { |
| 782 | if ( editor->cameraToWatchcxx . . $ SoXtDirectionalLightEditor#cameraToWatch. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { |
| 783 | SbRotationcxx . . $ SbRotation# newRot = editor->cameraToWatchcxx . . $ SoXtDirectionalLightEditor#cameraToWatch.->orientationcxx . . $ SoCamera#orientation..getValuecxx . . $ SoSFRotation#getValue(cd68af149be99fa7).(); |
| 784 | editor->myCameracxx . . $ SoXtDirectionalLightEditor#myCamera.->orientationcxx . . $ SoCamera#orientation..setValuecxx . . $ SoSFRotation#setValue(8b1048b3fc01a89c).( newRot ); |
| 785 | editor->myCameracxx . . $ SoXtDirectionalLightEditor#myCamera.->viewAllcxx . . $ SoCamera#viewAll(aa1d5c094c82e02).( editor->litStuffcxx . . $ SoXtDirectionalLightEditor#litStuff., |
| 786 | SbViewportRegioncxx . . $ SbViewportRegion#(editor->renderAreacxx . . $ SoXtDirectionalLightEditor#renderArea.->getSizecxx . . $ SoXtComponent#getSize(2f646538a2980851).()), 2.0 ); |
| 787 | } |
| 788 | } |
| 789 | |
| 790 | //////////////////////////////////////////////////////////////////////// |
| 791 | // |
| 792 | // Attach the lightSensor and the cameraSensor (if necessary). |
| 793 | // |
| 794 | void |
| 795 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor#::activatecxx . . $ SoXtDirectionalLightEditor#activate(49f6e7a06ebc5aa8).() |
| 796 | // |
| 797 | // use: private |
| 798 | //////////////////////////////////////////////////////////////////////// |
| 799 | { |
| 800 | // make sure the components are in sync with our local light |
| 801 | updateLocalComponentscxx . . $ SoXtDirectionalLightEditor#updateLocalComponents(49f6e7a06ebc5aa8).(); |
| 802 | |
| 803 | if (dirLightcxx . . $ SoXtDirectionalLightEditor#dirLight. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) |
| 804 | return; |
| 805 | |
| 806 | // attach lightSensor |
| 807 | if ( lightSensorcxx . . $ SoXtDirectionalLightEditor#lightSensor.->getAttachedNodecxx . . $ SoNodeSensor#getAttachedNode(b794963b450d51b3).() == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) { |
| 808 | lightSensorcxx . . $ SoXtDirectionalLightEditor#lightSensor.->attachcxx . . $ SoNodeSensor#attach(da6c7544ccee32bd).(dirLightcxx . . $ SoXtDirectionalLightEditor#dirLight.); // attach AFTER update |
| 809 | } |
| 810 | if ( cameraToWatchcxx . . $ SoXtDirectionalLightEditor#cameraToWatch. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ) { |
| 811 | cameraSensorCBcxx . . $ SoXtDirectionalLightEditor#cameraSensorCB(385f44349f4d8adf).( this, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ); |
| 812 | cameraSensorcxx . . $ SoXtDirectionalLightEditor#cameraSensor.->attachcxx . . $ SoNodeSensor#attach(da6c7544ccee32bd).(cameraToWatchcxx . . $ SoXtDirectionalLightEditor#cameraToWatch.); |
| 813 | } |
| 814 | } |
| 815 | |
| 816 | //////////////////////////////////////////////////////////////////////// |
| 817 | // |
| 818 | // Detach the lightSensor and cameraSensor. |
| 819 | // |
| 820 | void |
| 821 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor#::deactivatecxx . . $ SoXtDirectionalLightEditor#deactivate(49f6e7a06ebc5aa8).() |
| 822 | // |
| 823 | // use: private |
| 824 | //////////////////////////////////////////////////////////////////////// |
| 825 | { |
| 826 | // detach lightSensor |
| 827 | lightSensorcxx . . $ SoXtDirectionalLightEditor#lightSensor.->detachcxx . . $ SoNodeSensor#detach(49f6e7a06ebc5aa8).(); |
| 828 | cameraSensorcxx . . $ SoXtDirectionalLightEditor#cameraSensor.->detachcxx . . $ SoNodeSensor#detach(49f6e7a06ebc5aa8).(); |
| 829 | } |
| 830 | |
| 831 | |
| 832 | //////////////////////////////////////////////////////////////////////// |
| 833 | // |
| 834 | // Called by Xt when a menu item is picked. |
| 835 | // |
| 836 | // Use: private |
| 837 | // |
| 838 | void |
| 839 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor#::menuPickcxx . . $ SoXtDirectionalLightEditor#menuPick(4bf45020cef8cfbc).( |
| 840 | Widgetcxx . . $ Widget# w, |
| 841 | int id, |
| 842 | XmAnyCallbackStruct *cb) |
| 843 | // |
| 844 | //////////////////////////////////////////////////////////////////////// |
| 845 | { |
| 846 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor# *editor; |
| 847 | Argcxx . . $ Arg# args[1]; |
| 848 | |
| 849 | XtSetArgcxx . . $ `<external>/3673480128541058774/Intrinsic.h:1160:9`!(args[0], XmNuserDatacxx . . $ `<external>/427401153941432933/XmStrDefs.h:3525:9`!, &editor); |
| 850 | XtGetValues(w, args, 1); |
| 851 | |
| 852 | #ifdef DEBUG |
| 853 | if (editor == NULL) { |
| 854 | SoDebugError::post("SoXtDirectionalLightEditor::menuPick", |
| 855 | "- editor is NULL\n"); |
| 856 | return; |
| 857 | } |
| 858 | #endif |
| 859 | |
| 860 | Timecxx . . $ Time# eventTime = cb->event->xbuttoncxx . . $ _XEvent#xbutton..timecxx . . $ $anonymous_type_17d7f07cf933eea7_23#time.; |
| 861 | |
| 862 | switch (id) { |
| 863 | case k_COLOR_EDITORcxx . . $ k_COLOR_EDITOR.: |
| 864 | // build comp under our shell widget |
| 865 | if (editor->colorEditorcxx . . $ SoXtDirectionalLightEditor#colorEditor. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) { |
| 866 | _SoXtColorEditorcxx . . $ _SoXtColorEditor# *ce; |
| 867 | editor->colorEditorcxx . . $ SoXtDirectionalLightEditor#colorEditor. = ce = new _SoXtColorEditorcxx . . $ _SoXtColorEditor#_SoXtColorEditor(13a1a66a4f5d094a).( |
| 868 | SoXtcxx . . $ SoXt#::getShellWidgetcxx . . $ SoXt#getShellWidget(a686be44a4028679).(editor->getWidgetcxx . . $ SoXtComponent#getWidget(24ba213de9f943e3).()), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, FALSEcxx . . $ `<external>/3673480128541058774/Intrinsic.h:110:9`!); |
| 869 | ce->setCurrentSliderscxx . . $ _SoXtColorEditor#setCurrentSliders(2525c77de203fea3).(_SoXtColorEditorcxx . . $ _SoXtColorEditor#::NONEcxx . . $ _SoXtColorEditor#NONE.); |
| 870 | ce->setTitlecxx . . $ SoXtComponent#setTitle(85c52e162fed56f9).("Directional Light Color"); |
| 871 | ce->addColorChangedCallbackcxx . . $ _SoXtColorEditor#addColorChangedCallback(dcdee526c386ce58).( |
| 872 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor#::colorEditorCBcxx . . $ SoXtDirectionalLightEditor#colorEditorCB(a23719629555fa40)., editor); |
| 873 | } |
| 874 | |
| 875 | editor->colorEditorcxx . . $ SoXtDirectionalLightEditor#colorEditor.->showcxx . . $ SoXtComponent#show(49f6e7a06ebc5aa8).(); |
| 876 | break; |
| 877 | |
| 878 | case k_COPYcxx . . $ k_COPY.: |
| 879 | { |
| 880 | if (editor->clipboardcxx . . $ SoXtDirectionalLightEditor#clipboard. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) |
| 881 | editor->clipboardcxx . . $ SoXtDirectionalLightEditor#clipboard. = new SoXtClipboardcxx . . $ SoXtClipboard#(editor->getWidgetcxx . . $ SoXtComponent#getWidget(24ba213de9f943e3).()); |
| 882 | // Make a directional light with the same values as our manip. |
| 883 | // Then send it to the copy buffer. |
| 884 | SoDirectionalLightcxx . . $ SoDirectionalLight# *dl = new SoDirectionalLightcxx . . $ SoDirectionalLight#SoDirectionalLight(49f6e7a06ebc5aa8).; |
| 885 | dl->refcxx . . $ SoBase#ref(83f5f38750778ac8).(); |
| 886 | dl->intensitycxx . . $ SoLight#intensity. =cxx . . $ SoSFFloat#`operator=`(22108649baa7c4fc). editor->dirLightManipcxx . . $ SoXtDirectionalLightEditor#dirLightManip.->intensitycxx . . $ SoLight#intensity.; |
| 887 | dl->colorcxx . . $ SoLight#color. =cxx . . $ SoSFColor#`operator=`(4c3c4d3d8e426dbe). editor->dirLightManipcxx . . $ SoXtDirectionalLightEditor#dirLightManip.->colorcxx . . $ SoLight#color.; |
| 888 | dl->directioncxx . . $ SoDirectionalLight#direction. =cxx . . $ SoSFVec3f#`operator=`(bdd5d8f2d0d19240). editor->dirLightManipcxx . . $ SoXtDirectionalLightEditor#dirLightManip.->directioncxx . . $ SoDirectionalLight#direction.; |
| 889 | editor->clipboardcxx . . $ SoXtDirectionalLightEditor#clipboard.->copycxx . . $ SoXtClipboard#copy(68a2dd7e4b406e23).(dl, eventTime); |
| 890 | dl->unrefcxx . . $ SoBase#unref(83f5f38750778ac8).(); |
| 891 | } |
| 892 | break; |
| 893 | |
| 894 | case k_PASTEcxx . . $ k_PASTE.: |
| 895 | if (editor->clipboardcxx . . $ SoXtDirectionalLightEditor#clipboard. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) |
| 896 | editor->clipboardcxx . . $ SoXtDirectionalLightEditor#clipboard. = new SoXtClipboardcxx . . $ SoXtClipboard#(editor->getWidgetcxx . . $ SoXtComponent#getWidget(24ba213de9f943e3).()); |
| 897 | |
| 898 | editor->clipboardcxx . . $ SoXtDirectionalLightEditor#clipboard.->pastecxx . . $ SoXtClipboard#paste(3d5e5d94d85a12cf).(eventTime, |
| 899 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor#::pasteDoneCBcxx . . $ SoXtDirectionalLightEditor#pasteDoneCB(b9152ec4638eb195)., |
| 900 | editor); |
| 901 | break; |
| 902 | |
| 903 | case k_HELPcxx . . $ k_HELP.: |
| 904 | editor->openHelpCardcxx . . $ SoXtComponent#openHelpCard(85c52e162fed56f9).("SoXtDirectionalLightEditor.help"); |
| 905 | break; |
| 906 | } |
| 907 | } |
| 908 | |
| 909 | //////////////////////////////////////////////////////////////////////// |
| 910 | // |
| 911 | // The X server has finished getting the selection data, and the |
| 912 | // paste is complete. Look through the paste data for a dir light node. |
| 913 | // |
| 914 | // Use: static private |
| 915 | // |
| 916 | void |
| 917 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor#::pasteDoneCBcxx . . $ SoXtDirectionalLightEditor#pasteDoneCB(b9152ec4638eb195).(void *userData, SoPathListcxx . . $ SoPathList# *pathList) |
| 918 | // |
| 919 | //////////////////////////////////////////////////////////////////////// |
| 920 | { |
| 921 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor# *le = (SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor# *) userData; |
| 922 | |
| 923 | // Search for a directional light or base color. |
| 924 | SoDirectionalLightcxx . . $ SoDirectionalLight# *newLight = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 925 | SoBaseColorcxx . . $ SoBaseColor# *newColor = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 926 | for (int i = 0; i < pathList->getLengthcxx . . $ SbPList#getLength(455f465bc33b4cdf).(); i++) { |
| 927 | SoFullPathcxx . . $ SoFullPath# *fullP = (SoFullPathcxx . . $ SoFullPath# *) (*pathList)[cxx . . $ SoPathList#`operator[]`(81b2b9099fcfac9c).i]; |
| 928 | if (fullP->getTailcxx . . $ SoFullPath#getTail(b794963b450d51b3).()->isOfTypecxx . . $ SoBase#isOfType(1fd66475a268b64e).(SoDirectionalLightcxx . . $ SoDirectionalLight#::getClassTypeIdcxx . . $ SoDirectionalLight#getClassTypeId(c00c150378d2b968).())) { |
| 929 | newLight = (SoDirectionalLightcxx . . $ SoDirectionalLight# *) fullP->getTailcxx . . $ SoFullPath#getTail(b794963b450d51b3).(); |
| 930 | break; |
| 931 | } |
| 932 | if (fullP->getTailcxx . . $ SoFullPath#getTail(b794963b450d51b3).()->isOfTypecxx . . $ SoBase#isOfType(1fd66475a268b64e).(SoBaseColorcxx . . $ SoBaseColor#::getClassTypeIdcxx . . $ SoBaseColor#getClassTypeId(c00c150378d2b968).())) { |
| 933 | newColor = (SoBaseColorcxx . . $ SoBaseColor# *) fullP->getTailcxx . . $ SoFullPath#getTail(b794963b450d51b3).(); |
| 934 | break; |
| 935 | } |
| 936 | } |
| 937 | |
| 938 | if (newLight != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) { |
| 939 | // pasted a light - update everything! |
| 940 | le->setLightcxx . . $ SoXtDirectionalLightEditor#setLight(2c02be47c3154506).(*newLight); |
| 941 | } |
| 942 | else if (newColor != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) { |
| 943 | // pasted a color - update the dirLight color, and the editor |
| 944 | if (le->dirLightcxx . . $ SoXtDirectionalLightEditor#dirLight. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) { |
| 945 | // detach the sensor while we update the field |
| 946 | le->lightSensorcxx . . $ SoXtDirectionalLightEditor#lightSensor.->detachcxx . . $ SoNodeSensor#detach(49f6e7a06ebc5aa8).(); |
| 947 | le->dirLightcxx . . $ SoXtDirectionalLightEditor#dirLight.->colorcxx . . $ SoLight#color..setValuecxx . . $ SoSFColor#setValue(fad0b7baf6bfdbd3).(newColor->rgbcxx . . $ SoBaseColor#rgb.[cxx . . $ SoMFColor#`operator[]`(7e2accdb1a504c77).0]); |
| 948 | le->lightSensorcxx . . $ SoXtDirectionalLightEditor#lightSensor.->attachcxx . . $ SoNodeSensor#attach(da6c7544ccee32bd).(le->dirLightcxx . . $ SoXtDirectionalLightEditor#dirLight.); |
| 949 | } |
| 950 | le->ignoreCallbackcxx . . $ SoXtDirectionalLightEditor#ignoreCallback. = TRUEcxx . . $ `<external>/3673480128541058774/Intrinsic.h:111:9`!; // ignore resulting manip callback |
| 951 | le->dirLightManipcxx . . $ SoXtDirectionalLightEditor#dirLightManip.->colorcxx . . $ SoLight#color..setValuecxx . . $ SoSFColor#setValue(fad0b7baf6bfdbd3).(newColor->rgbcxx . . $ SoBaseColor#rgb.[cxx . . $ SoMFColor#`operator[]`(7e2accdb1a504c77).0]); |
| 952 | le->ignoreCallbackcxx . . $ SoXtDirectionalLightEditor#ignoreCallback. = FALSEcxx . . $ `<external>/3673480128541058774/Intrinsic.h:110:9`!; |
| 953 | |
| 954 | le->updateLocalComponentscxx . . $ SoXtDirectionalLightEditor#updateLocalComponents(49f6e7a06ebc5aa8).(); |
| 955 | |
| 956 | // invoke the callbacks with the pasted light values |
| 957 | le->callbackListcxx . . $ SoXtDirectionalLightEditor#callbackList.->invokeCallbackscxx . . $ SoCallbackList#invokeCallbacks(5d22bdacc48458e8).(le->dirLightManipcxx . . $ SoXtDirectionalLightEditor#dirLightManip.); |
| 958 | } |
| 959 | |
| 960 | // We delete the callback data when done with it. |
| 961 | delete pathList; |
| 962 | } |
| 963 | |
| 964 | //////////////////////////////////////////////////////////////////////// |
| 965 | // |
| 966 | // The X server has finished getting the selection data, and the |
| 967 | // paste is complete. Look through the paste data for a dir light node. |
| 968 | // |
| 969 | // Use: private |
| 970 | // |
| 971 | void |
| 972 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor#::copyLightcxx . . $ SoXtDirectionalLightEditor#copyLight(7b804236aabc6987).( |
| 973 | SoDirectionalLightcxx . . $ SoDirectionalLight# *dst, |
| 974 | const SoDirectionalLightcxx . . $ SoDirectionalLight# *src) |
| 975 | // |
| 976 | //////////////////////////////////////////////////////////////////////// |
| 977 | { |
| 978 | // set values in dst |
| 979 | dst->colorcxx . . $ SoLight#color..setValuecxx . . $ SoSFColor#setValue(fad0b7baf6bfdbd3).(src->colorcxx . . $ SoLight#color..getValuecxx . . $ SoSFColor#getValue(d23318ddecff63dd).()); |
| 980 | dst->intensitycxx . . $ SoLight#intensity..setValuecxx . . $ SoSFFloat#setValue(9364e6e7bff7660).(src->intensitycxx . . $ SoLight#intensity..getValuecxx . . $ SoSFFloat#getValue(5036dfe8d4170af2).()); |
| 981 | dst->directioncxx . . $ SoDirectionalLight#direction..setValuecxx . . $ SoSFVec3f#setValue(65a601b9d70571d6).(src->directioncxx . . $ SoDirectionalLight#direction..getValuecxx . . $ SoSFVec3f#getValue(b5c384c15c94bb12).()); |
| 982 | } |
| 983 | |
| 984 | //////////////////////////////////////////////////////////////////////// |
| 985 | // |
| 986 | // The dir light manip has just changed the dirLightManip direction. |
| 987 | // We now update the attached light, and invoke the callbacks. |
| 988 | // |
| 989 | // Use: static private |
| 990 | // |
| 991 | void |
| 992 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor#::dirLightManipCBcxx . . $ SoXtDirectionalLightEditor#dirLightManipCB(7027446dc0b7318f).(void *userData, SoDraggercxx . . $ SoDragger# *) |
| 993 | // |
| 994 | //////////////////////////////////////////////////////////////////////// |
| 995 | { |
| 996 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor# *ed = (SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor# *) userData; |
| 997 | |
| 998 | if (ed->ignoreCallbackcxx . . $ SoXtDirectionalLightEditor#ignoreCallback.) |
| 999 | return; |
| 1000 | |
| 1001 | // update the attached light, if it exists |
| 1002 | if (ed->dirLightcxx . . $ SoXtDirectionalLightEditor#dirLight. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) { |
| 1003 | ed->lightSensorcxx . . $ SoXtDirectionalLightEditor#lightSensor.->detachcxx . . $ SoNodeSensor#detach(49f6e7a06ebc5aa8).(); |
| 1004 | ed->dirLightcxx . . $ SoXtDirectionalLightEditor#dirLight.->directioncxx . . $ SoDirectionalLight#direction..setValuecxx . . $ SoSFVec3f#setValue(65a601b9d70571d6).( |
| 1005 | ed->dirLightManipcxx . . $ SoXtDirectionalLightEditor#dirLightManip.->directioncxx . . $ SoDirectionalLight#direction..getValuecxx . . $ SoSFVec3f#getValue(b5c384c15c94bb12).()); |
| 1006 | ed->lightSensorcxx . . $ SoXtDirectionalLightEditor#lightSensor.->attachcxx . . $ SoNodeSensor#attach(da6c7544ccee32bd).(ed->dirLightcxx . . $ SoXtDirectionalLightEditor#dirLight.); |
| 1007 | } |
| 1008 | |
| 1009 | // invoke the callbacks |
| 1010 | ed->callbackListcxx . . $ SoXtDirectionalLightEditor#callbackList.->invokeCallbackscxx . . $ SoCallbackList#invokeCallbacks(5d22bdacc48458e8).(ed->dirLightManipcxx . . $ SoXtDirectionalLightEditor#dirLightManip.); |
| 1011 | } |
| 1012 | |
| 1013 | // |
| 1014 | // called whenever the component becomes visibble or not |
| 1015 | // |
| 1016 | void |
| 1017 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor#::visibilityChangeCBcxx . . $ SoXtDirectionalLightEditor#visibilityChangeCB(d0320739773070f2).(void *pt, SbBoolcxx . . $ SbBool# visible) |
| 1018 | { |
| 1019 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor# *p = (SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor# *)pt; |
| 1020 | |
| 1021 | if (visible) |
| 1022 | p->activatecxx . . $ SoXtDirectionalLightEditor#activate(49f6e7a06ebc5aa8).(); |
| 1023 | else |
| 1024 | p->deactivatecxx . . $ SoXtDirectionalLightEditor#deactivate(49f6e7a06ebc5aa8).(); |
| 1025 | } |
| 1026 | |
| 1027 | |
| 1028 | // |
| 1029 | // redefine those generic virtual functions |
| 1030 | // |
| 1031 | const char * |
| 1032 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor#::getDefaultWidgetNamecxx . . $ SoXtDirectionalLightEditor#getDefaultWidgetName(a9f41ea0e82d88cf).() const |
| 1033 | { return "SoXtDirectionalLightEditor"; } |
| 1034 | |
| 1035 | const char * |
| 1036 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor#::getDefaultTitlecxx . . $ SoXtDirectionalLightEditor#getDefaultTitle(a9f41ea0e82d88cf).() const |
| 1037 | { return "Dir Light Editor"; } |
| 1038 | |
| 1039 | const char * |
| 1040 | SoXtDirectionalLightEditorcxx . . $ SoXtDirectionalLightEditor#::getDefaultIconTitlecxx . . $ SoXtDirectionalLightEditor#getDefaultIconTitle(a9f41ea0e82d88cf).() const |
| 1041 | { return "Dir Light Ed"; } |