Debian Codegraph @

apps/nodes/GeneralizedCylinder/GeneralizedCylinder.c++

raw symbols SCIP
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 | Classes:
39 | GeneralizedCylinder
40 |
41 | Author(s) : Paul Isaacs
42 |
43 */
44
45 #include <cstdio>
46 #include <Inventor/SbLinear.h>cxx . . $ `<file>/lib/database/include/Inventor/SbLinear.h`/
47 #include <Inventor/SoDB.h>cxx . . $ `<file>/lib/database/include/Inventor/SoDB.h`/
48 #include <Inventor/nodekits/SoAppearanceKit.h>cxx . . $ `<file>/lib/nodekits/include/Inventor/nodekits/SoAppearanceKit.h`/
49 #include <Inventor/nodes/SoGroup.h>cxx . . $ `<file>/lib/database/include/Inventor/nodes/SoGroup.h`/
50 #include <Inventor/nodes/SoSeparator.h>cxx . . $ `<file>/lib/database/include/Inventor/nodes/SoSeparator.h`/
51 #include <Inventor/nodes/SoShapeHints.h>cxx . . $ `<file>/lib/database/include/Inventor/nodes/SoShapeHints.h`/
52 #include <Inventor/nodes/SoCoordinate3.h>cxx . . $ `<file>/lib/database/include/Inventor/nodes/SoCoordinate3.h`/
53 #include <Inventor/nodes/SoFaceSet.h>cxx . . $ `<file>/lib/database/include/Inventor/nodes/SoFaceSet.h`/
54 #include <Inventor/nodes/SoIndexedFaceSet.h>cxx . . $ `<file>/lib/database/include/Inventor/nodes/SoIndexedFaceSet.h`/
55 #include <Inventor/nodes/SoMaterial.h>cxx . . $ `<file>/lib/database/include/Inventor/nodes/SoMaterial.h`/
56 #include <Inventor/nodes/SoQuadMesh.h>cxx . . $ `<file>/lib/database/include/Inventor/nodes/SoQuadMesh.h`/
57 #include <Inventor/nodes/SoSwitch.h>cxx . . $ `<file>/lib/database/include/Inventor/nodes/SoSwitch.h`/
58 #include <Inventor/nodes/SoTextureCoordinateBinding.h>cxx . . $ `<file>/lib/database/include/Inventor/nodes/SoTextureCoordinateBinding.h`/
59 #include <Inventor/nodes/SoTextureCoordinate2.h>cxx . . $ `<file>/lib/database/include/Inventor/nodes/SoTextureCoordinate2.h`/
60 #include <Inventor/nodes/SoTexture2Transform.h>cxx . . $ `<file>/lib/database/include/Inventor/nodes/SoTexture2Transform.h`/
61 #include <Inventor/nodes/SoTexture2.h>cxx . . $ `<file>/lib/database/include/Inventor/nodes/SoTexture2.h`/
62 #include <Inventor/nodes/SoTransform.h>cxx . . $ `<file>/lib/database/include/Inventor/nodes/SoTransform.h`/
63 #include <Inventor/nodes/SoTriangleStripSet.h>cxx . . $ `<file>/lib/database/include/Inventor/nodes/SoTriangleStripSet.h`/
64
65 #include <Inventor/manips/SoTransformManip.h>cxx . . $ `<file>/lib/interaction/include/Inventor/manips/SoTransformManip.h`/
66 #include <Inventor/draggers/SoDragger.h>cxx . . $ `<file>/lib/interaction/include/Inventor/draggers/SoDragger.h`/
67 #include <Inventor/nodes/SoSurroundScale.h>cxx . . $ `<file>/lib/interaction/include/Inventor/nodes/SoSurroundScale.h`/
68
69 #include <Inventor/actions/SoWriteAction.h>cxx . . $ `<file>/lib/database/include/Inventor/actions/SoWriteAction.h`/
70
71 #include <Inventor/sensors/SoNodeSensor.h>cxx . . $ `<file>/lib/database/include/Inventor/sensors/SoNodeSensor.h`/
72
73 #include "GeneralizedCylinder.h"cxx . . $ `<file>/apps/nodes/GeneralizedCylinder/GeneralizedCylinder.h`/
74 #include "Triangulator.h"cxx . . $ `<file>/apps/nodes/GeneralizedCylinder/Triangulator.h`/
75 #include "NurbMaker.h"cxx . . $ `<file>/apps/nodes/GeneralizedCylinder/NurbMaker.h`/
76 #include <Inventor/nodes/SoVertexShape.h>cxx . . $ `<file>/lib/database/include/Inventor/nodes/SoVertexShape.h`/
77
78
79 SO_KIT_SOURCEcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:194:9`!(GeneralizedCylinder);
80
81
82 ////////////////////////////////////////////////////////////////////////
83 //
84 // Description:
85 // This initializes the GeneralizedCylinder class.
86 //
87 // Use: internal
88
89 void
90 GeneralizedCylindercxx . . $ GeneralizedCylinder#::initClasscxx . . $ GeneralizedCylinder#initClass(49f6e7a06ebc5aa8).()
91 //
92 ////////////////////////////////////////////////////////////////////////
93 {
94 SO__KIT_INIT_CLASScxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:203:9`!(GeneralizedCylinder, "GeneralizedCylinder",
95 SoSeparatorKit);
96 }
97
98 ////////////////////////////////////////////////////////////////////////
99 //
100 // Description:
101 // Constructor
102 //
103 // Use: public
104
105 GeneralizedCylindercxx . . $ GeneralizedCylinder#::GeneralizedCylindercxx . . $ GeneralizedCylinder#GeneralizedCylinder(49f6e7a06ebc5aa8).()
106 //
107 ////////////////////////////////////////////////////////////////////////
108 {
109 SO_KIT_CONSTRUCTORcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:254:9`!(GeneralizedCylinder);
110
111 SO_KIT_ADD_FIELDcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:261:9`!(renderShapeType, (FACE_SET));
112 SO_KIT_ADD_FIELDcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:261:9`!(normsFlipped, (FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`!));
113 SO_KIT_ADD_FIELDcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:261:9`!(profileClosed, (FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`!));
114 SO_KIT_ADD_FIELDcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:261:9`!(crossSectionClosed, (FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`!));
115 SO_KIT_ADD_FIELDcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:261:9`!(spineClosed, (FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`!));
116 SO_KIT_ADD_FIELDcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:261:9`!(twistClosed, (FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`!));
117 SO_KIT_ADD_FIELDcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:261:9`!(minNumRows, (1));
118 SO_KIT_ADD_FIELDcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:261:9`!(minNumCols, (1));
119 SO_KIT_ADD_FIELDcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:261:9`!(withSides, (TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!));
120 SO_KIT_ADD_FIELDcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:261:9`!(withTopCap, (TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!));
121 SO_KIT_ADD_FIELDcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:261:9`!(withBottomCap, (TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!));
122 SO_KIT_ADD_FIELDcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:261:9`!(withTextureCoords, (FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`!));
123
124 SO_KIT_DEFINE_ENUM_VALUEcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:264:9`!(RenderShapeType, FACE_SET);
125 SO_KIT_DEFINE_ENUM_VALUEcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:264:9`!(RenderShapeType, TRIANGLE_STRIP_SET);
126 SO_KIT_DEFINE_ENUM_VALUEcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:264:9`!(RenderShapeType, QUAD_MESH);
127 SO_KIT_DEFINE_ENUM_VALUEcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:264:9`!(RenderShapeType, BEZIER_SURFACE);
128 SO_KIT_DEFINE_ENUM_VALUEcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:264:9`!(RenderShapeType, CUBIC_SPLINE_SURFACE);
129 SO_KIT_DEFINE_ENUM_VALUEcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:264:9`!(RenderShapeType, CUBIC_TO_EDGE_SURFACE);
130 SO_KIT_SET_SF_ENUM_TYPEcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:270:9`!(renderShapeType, RenderShapeType);
131
132 // The input half of the scene graph
133 SO_KIT_ADD_CATALOG_ENTRYcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:333:9`!(inputSwitch,SoSwitch,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!,topSeparator,childList,FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! );
134 SO_KIT_ADD_CATALOG_ENTRYcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:333:9`!(profileCoords,SoCoordinate3,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!,inputSwitch,,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`! );
135 SO_KIT_ADD_CATALOG_ENTRYcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:333:9`!(crossSectionCoords,SoCoordinate3,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!,inputSwitch,,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`! );
136 SO_KIT_ADD_CATALOG_ENTRYcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:333:9`!(spineCoords,SoCoordinate3,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!,inputSwitch,,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`! );
137 SO_KIT_ADD_CATALOG_ENTRYcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:333:9`!(twistCoords,SoCoordinate3,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!,inputSwitch,,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`! );
138
139 // The output half of the scene graph
140 // ( the shape produced during 'updateSurface' based on the contents
141 // of the input half of the scene graph
142 SO_KIT_ADD_CATALOG_ENTRYcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:333:9`!(outputGrp,SoGroup,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!,topSeparator,childList,FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! );
143 SO_KIT_ADD_CATALOG_ENTRYcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:333:9`!(shapeHints,SoShapeHints,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!,outputGrp,,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`! );
144 SO_KIT_ADD_CATALOG_ENTRYcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:333:9`!(textureBinding,SoTextureCoordinateBinding,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!,outputGrp,,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`! );
145 SO_KIT_ADD_CATALOG_ENTRYcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:333:9`!(textureCoords,SoTextureCoordinate2,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!,outputGrp,,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`! );
146 SO_KIT_ADD_CATALOG_ENTRYcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:333:9`!(texture2,SoTexture2,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!,outputGrp,,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`! );
147 SO_KIT_ADD_CATALOG_ENTRYcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:333:9`!(coords,SoCoordinate3,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!,outputGrp,,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!);
148 SO_KIT_ADD_CATALOG_ENTRYcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:333:9`!(faceSet,SoFaceSet,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!,outputGrp,,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!);
149 SO_KIT_ADD_CATALOG_ENTRYcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:333:9`!(quadMesh,SoQuadMesh,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!,outputGrp,,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!);
150 SO_KIT_ADD_CATALOG_ENTRYcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:333:9`!(nurbsSurfaceGroup,SoGroup,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!,outputGrp,,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!);
151 SO_KIT_ADD_CATALOG_ENTRYcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:333:9`!(triangleStripSet,SoTriangleStripSet,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!,outputGrp,,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!);
152 SO_KIT_ADD_CATALOG_ENTRYcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:333:9`!(capTextureBinding,SoTextureCoordinateBinding,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!,outputGrp,,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`! );
153 SO_KIT_ADD_CATALOG_ENTRYcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:333:9`!(capTextureCoords,SoTextureCoordinate2,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!,outputGrp,,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`! );
154 SO_KIT_ADD_CATALOG_ENTRYcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:333:9`!(topCapCoords,SoCoordinate3,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!,outputGrp,,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`! );
155 SO_KIT_ADD_CATALOG_ENTRYcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:333:9`!(topCapFaces,SoIndexedFaceSet,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!,outputGrp,,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`! );
156 SO_KIT_ADD_CATALOG_ENTRYcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:333:9`!(bottomCapCoords,SoCoordinate3,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!,outputGrp,,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`! );
157 SO_KIT_ADD_CATALOG_ENTRYcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:333:9`!(bottomCapFaces,SoIndexedFaceSet,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!,outputGrp,,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`! );
158
159 SO_KIT_INIT_INSTANCEcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoSubKit.h:546:9`!();
160
161
162 //////////////////////////////////////////
163 // Set up the input half of the subgraph
164 //////////////////////////////////////////
165 SoSwitchcxx . . $ SoSwitch# *crvSwitch = new SoSwitchcxx . . $ SoSwitch#;
166 crvSwitch->whichChildcxx . . $ SoSwitch#whichChild. =cxx . . $ SoSFInt32#`operator=`(7864480464b09eea). SO_SWITCH_NONEcxx . . $ `lib/database/include/Inventor/nodes/SoSwitch.h:75:9`!;
167 setAnyPartcxx . . $ SoBaseKit#setAnyPart(9a61422242ad1ac7).( "inputSwitch"cxx . . $ SbName#SbName(85c52e162fed56f9).,crvSwitch,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`! );
168
169 setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).( "profileCoords"cxx . . $ SbName#SbName(85c52e162fed56f9).,new SoCoordinate3cxx . . $ SoCoordinate3# );
170 setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).( "crossSectionCoords"cxx . . $ SbName#SbName(85c52e162fed56f9).,new SoCoordinate3cxx . . $ SoCoordinate3# );
171 setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).( "spineCoords"cxx . . $ SbName#SbName(85c52e162fed56f9)., new SoCoordinate3cxx . . $ SoCoordinate3# );
172 setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).( "twistCoords"cxx . . $ SbName#SbName(85c52e162fed56f9)., new SoCoordinate3cxx . . $ SoCoordinate3# );
173
174 // Set the default values for these curves...
175 setcxx . . $ SoBaseKit#set(1ef8e6ec083aabb9).("profileCoords { point [ 1 -1 0, 1 1 0 ] }" );
176 setcxx . . $ SoBaseKit#set(1ef8e6ec083aabb9).("crossSectionCoords { point [ 1 0 1, 1 0 -1, -1 0 -1, -1 0 1 ] }" );
177 setcxx . . $ SoBaseKit#set(1ef8e6ec083aabb9).("spineCoords { point [ 0 -1 0, 0 1 0 ] }" );
178 setcxx . . $ SoBaseKit#set(1ef8e6ec083aabb9).("twistCoords { point [ 0 -1 0, 0 1 0 ] }" );
179
180
181
182 //////////////////////////////////////////
183 // Set up the flags and parameters
184 //////////////////////////////////////////
185
186 fullProfilecxx . . $ GeneralizedCylinder#fullProfile. = new SoCoordinate3cxx . . $ SoCoordinate3#;
187 fullCrossSectioncxx . . $ GeneralizedCylinder#fullCrossSection. = new SoCoordinate3cxx . . $ SoCoordinate3#;
188 fullProfilecxx . . $ GeneralizedCylinder#fullProfile.->refcxx . . $ SoBase#ref(83f5f38750778ac8).();
189 fullCrossSectioncxx . . $ GeneralizedCylinder#fullCrossSection.->refcxx . . $ SoBase#ref(83f5f38750778ac8).();
190
191 profileAlreadyClosedcxx . . $ GeneralizedCylinder#profileAlreadyClosed. = FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`!;
192 crossSectionAlreadyClosedcxx . . $ GeneralizedCylinder#crossSectionAlreadyClosed. = FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`!;
193 spineAlreadyClosedcxx . . $ GeneralizedCylinder#spineAlreadyClosed. = FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`!;
194 twistAlreadyClosedcxx . . $ GeneralizedCylinder#twistAlreadyClosed. = FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`!;
195 alreadyWithTextureCoordscxx . . $ GeneralizedCylinder#alreadyWithTextureCoords. = FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`!;
196
197 //////////////////////////////////////////
198 // Set up the output half of the subgraph
199 // that needs to be ready ahead of time.
200 //////////////////////////////////////////
201
202 //
203 // This combination of shape hints will turn on two-sided lighting
204 // for us (if it is available)
205 //
206 SoShapeHintscxx . . $ SoShapeHints# *hints = new SoShapeHintscxx . . $ SoShapeHints#;
207 hints->vertexOrderingcxx . . $ SoShapeHints#vertexOrdering. =cxx . . $ SoSFEnum#`operator=`(7864480464b09eea). SoShapeHintscxx . . $ SoShapeHints#::COUNTERCLOCKWISEcxx . . $ SoShapeHints#COUNTERCLOCKWISE.;
208 hints->shapeTypecxx . . $ SoShapeHints#shapeType. =cxx . . $ SoSFEnum#`operator=`(7864480464b09eea). SoShapeHintscxx . . $ SoShapeHints#::UNKNOWN_SHAPE_TYPEcxx . . $ SoShapeHints#UNKNOWN_SHAPE_TYPE.;
209 hints->faceTypecxx . . $ SoShapeHints#faceType. =cxx . . $ SoSFEnum#`operator=`(7864480464b09eea). SoShapeHintscxx . . $ SoShapeHints#::CONVEXcxx . . $ SoShapeHints#CONVEX.;
210
211 hints->creaseAnglecxx . . $ SoShapeHints#creaseAngle. =cxx . . $ SoSFFloat#`operator=`(fbcf3211dfe1bfd1). M_PIcxx . . $ `<external>/11263917310783833665/math.h:1121:10`!/6.0;
212 setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).( "shapeHints"cxx . . $ SbName#SbName(85c52e162fed56f9)., hints );
213
214 topCapScratchFacecxx . . $ GeneralizedCylinder#topCapScratchFace. = new SoIndexedFaceSetcxx . . $ SoIndexedFaceSet#;
215 topCapScratchFacecxx . . $ GeneralizedCylinder#topCapScratchFace.->refcxx . . $ SoBase#ref(83f5f38750778ac8).();
216
217 bottomCapScratchFacecxx . . $ GeneralizedCylinder#bottomCapScratchFace. = new SoIndexedFaceSetcxx . . $ SoIndexedFaceSet#;
218 bottomCapScratchFacecxx . . $ GeneralizedCylinder#bottomCapScratchFace.->refcxx . . $ SoBase#ref(83f5f38750778ac8).();
219
220 numAllocedSpineKeyRotscxx . . $ GeneralizedCylinder#numAllocedSpineKeyRots. = 0;
221 spineKeyPointRotationscxx . . $ GeneralizedCylinder#spineKeyPointRotations. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!;
222 spineParamDistancescxx . . $ GeneralizedCylinder#spineParamDistances. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!;
223
224 // Initialize our nurbMaker
225 myNurbMakercxx . . $ GeneralizedCylinder#myNurbMaker. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!;
226
227 selfSensorcxx . . $ GeneralizedCylinder#selfSensor. = new SoNodeSensorcxx . . $ SoNodeSensor#( GeneralizedCylindercxx . . $ GeneralizedCylinder#::fieldsChangedCBcxx . . $ GeneralizedCylinder#fieldsChangedCB(c8d298b3e215c027)., this);
228 selfSensorcxx . . $ GeneralizedCylinder#selfSensor.->setPrioritycxx . . $ SoDelayQueueSensor#setPriority(cb2f890c2fdad230).(0);
229
230 inputSensorcxx . . $ GeneralizedCylinder#inputSensor. = new SoNodeSensorcxx . . $ SoNodeSensor#( GeneralizedCylindercxx . . $ GeneralizedCylinder#::inputChangedCBcxx . . $ GeneralizedCylinder#inputChangedCB(c8d298b3e215c027)., this);
231 inputSensorcxx . . $ GeneralizedCylinder#inputSensor.->setPrioritycxx . . $ SoDelayQueueSensor#setPriority(cb2f890c2fdad230).(0);
232
233 setUpConnectionscxx . . $ GeneralizedCylinder#setUpConnections(9b79fb6aee4c0440).(TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!);
234 }
235
236 // detach/attach any sensors, callbacks, and/or field connections.
237 // Called by: start/end of SoBaseKit::readInstance
238 // and on new copy by: start/end of SoBaseKit::copy.
239 // Classes that redefine must call setUpConnections(TRUE,TRUE)
240 // at end of constructor.
241 // Returns the state of the node when this was called.
242 SbBoolcxx . . $ SbBool#
243 GeneralizedCylindercxx . . $ GeneralizedCylinder#::setUpConnectionscxx . . $ GeneralizedCylinder#setUpConnections(9b79fb6aee4c0440).( SbBoolcxx . . $ SbBool# onOff, SbBoolcxx . . $ SbBool# doItAlways )
244 {
245 if ( !doItAlways && connectionsSetUpcxx . . $ SoBaseKit#connectionsSetUp. == onOff)
246 return onOff;
247
248 if ( onOff ) {
249 // We connect AFTER base class.
250 SoSeparatorKitcxx . . $ SoSeparatorKit#::setUpConnectionscxx . . $ SoSeparatorKit#setUpConnections(9b79fb6aee4c0440).( onOff, doItAlways );
251
252 // Turn sensors on...
253 SoNodecxx . . $ SoNode# *iSw = inputSwitchcxx . . $ GeneralizedCylinder#inputSwitch..getValuecxx . . $ SoSFNode#getValue(b794963b450d51b3).();
254 if (iSw && inputSensorcxx . . $ GeneralizedCylinder#inputSensor.->getAttachedNodecxx . . $ SoNodeSensor#getAttachedNode(b794963b450d51b3).() != iSw)
255 inputSensorcxx . . $ GeneralizedCylinder#inputSensor.->attachcxx . . $ SoNodeSensor#attach(da6c7544ccee32bd).(iSw);
256 if (selfSensorcxx . . $ GeneralizedCylinder#selfSensor.->getAttachedNodecxx . . $ SoNodeSensor#getAttachedNode(b794963b450d51b3).() != this)
257 selfSensorcxx . . $ GeneralizedCylinder#selfSensor.->attachcxx . . $ SoNodeSensor#attach(da6c7544ccee32bd).(this);
258 updateSurfacecxx . . $ GeneralizedCylinder#updateSurface(49f6e7a06ebc5aa8).();
259 }
260 else {
261
262 // We disconnect BEFORE base class.
263 if (selfSensorcxx . . $ GeneralizedCylinder#selfSensor.->getAttachedNodecxx . . $ SoNodeSensor#getAttachedNode(b794963b450d51b3).())
264 selfSensorcxx . . $ GeneralizedCylinder#selfSensor.->detachcxx . . $ SoNodeSensor#detach(49f6e7a06ebc5aa8).();
265 if (inputSensorcxx . . $ GeneralizedCylinder#inputSensor.->getAttachedNodecxx . . $ SoNodeSensor#getAttachedNode(b794963b450d51b3).())
266 inputSensorcxx . . $ GeneralizedCylinder#inputSensor.->detachcxx . . $ SoNodeSensor#detach(49f6e7a06ebc5aa8).();
267
268 SoSeparatorKitcxx . . $ SoSeparatorKit#::setUpConnectionscxx . . $ SoSeparatorKit#setUpConnections(9b79fb6aee4c0440).( onOff, doItAlways );
269 }
270 return !(connectionsSetUpcxx . . $ SoBaseKit#connectionsSetUp. = onOff);
271 }
272
273 void
274 GeneralizedCylindercxx . . $ GeneralizedCylinder#::setDefaultOnNonWritingFieldscxx . . $ GeneralizedCylinder#setDefaultOnNonWritingFields(49f6e7a06ebc5aa8).()
275 {
276 // Before writing, call setDefault(TRUE) on all parts
277 // under the output group.
278 outputGrpcxx . . $ GeneralizedCylinder#outputGrp..setDefaultcxx . . $ SoField#setDefault(d4f767463ce0a6b3).(TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!);
279 shapeHintscxx . . $ GeneralizedCylinder#shapeHints..setDefaultcxx . . $ SoField#setDefault(d4f767463ce0a6b3).(TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!);
280 textureBindingcxx . . $ GeneralizedCylinder#textureBinding..setDefaultcxx . . $ SoField#setDefault(d4f767463ce0a6b3).(TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!);
281 textureCoordscxx . . $ GeneralizedCylinder#textureCoords..setDefaultcxx . . $ SoField#setDefault(d4f767463ce0a6b3).(TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!);
282 texture2Transformcxx . . $ SoSeparatorKit#texture2Transform..setDefaultcxx . . $ SoField#setDefault(d4f767463ce0a6b3).(TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!);
283 coordscxx . . $ GeneralizedCylinder#coords..setDefaultcxx . . $ SoField#setDefault(d4f767463ce0a6b3).(TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!);
284 faceSetcxx . . $ GeneralizedCylinder#faceSet..setDefaultcxx . . $ SoField#setDefault(d4f767463ce0a6b3).(TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!);
285 quadMeshcxx . . $ GeneralizedCylinder#quadMesh..setDefaultcxx . . $ SoField#setDefault(d4f767463ce0a6b3).(TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!);
286 nurbsSurfaceGroupcxx . . $ GeneralizedCylinder#nurbsSurfaceGroup..setDefaultcxx . . $ SoField#setDefault(d4f767463ce0a6b3).(TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!);
287 triangleStripSetcxx . . $ GeneralizedCylinder#triangleStripSet..setDefaultcxx . . $ SoField#setDefault(d4f767463ce0a6b3).(TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!);
288 capTextureBindingcxx . . $ GeneralizedCylinder#capTextureBinding..setDefaultcxx . . $ SoField#setDefault(d4f767463ce0a6b3).(TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!);
289 capTextureCoordscxx . . $ GeneralizedCylinder#capTextureCoords..setDefaultcxx . . $ SoField#setDefault(d4f767463ce0a6b3).(TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!);
290 topCapCoordscxx . . $ GeneralizedCylinder#topCapCoords..setDefaultcxx . . $ SoField#setDefault(d4f767463ce0a6b3).(TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!);
291 topCapFacescxx . . $ GeneralizedCylinder#topCapFaces..setDefaultcxx . . $ SoField#setDefault(d4f767463ce0a6b3).(TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!);
292 bottomCapCoordscxx . . $ GeneralizedCylinder#bottomCapCoords..setDefaultcxx . . $ SoField#setDefault(d4f767463ce0a6b3).(TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!);
293 bottomCapFacescxx . . $ GeneralizedCylinder#bottomCapFaces..setDefaultcxx . . $ SoField#setDefault(d4f767463ce0a6b3).(TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!);
294
295 // Call base class...
296 SoSeparatorKitcxx . . $ SoSeparatorKit#::setDefaultOnNonWritingFieldscxx . . $ SoSeparatorKit#setDefaultOnNonWritingFields(49f6e7a06ebc5aa8).();
297 }
298
299 //
300 // Destructor. Must unref everything reffed in the constructor.
301 //
302 GeneralizedCylindercxx . . $ GeneralizedCylinder#::~cxx . . $ GeneralizedCylinder#`~GeneralizedCylinder`(49f6e7a06ebc5aa8).GeneralizedCylindercxx . . $ GeneralizedCylinder#()
303 {
304 if ( topCapScratchFacecxx . . $ GeneralizedCylinder#topCapScratchFace. != NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!) {
305 topCapScratchFacecxx . . $ GeneralizedCylinder#topCapScratchFace.->unrefcxx . . $ SoBase#unref(83f5f38750778ac8).();
306 topCapScratchFacecxx . . $ GeneralizedCylinder#topCapScratchFace. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!;
307 }
308 if ( bottomCapScratchFacecxx . . $ GeneralizedCylinder#bottomCapScratchFace. != NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!) {
309 bottomCapScratchFacecxx . . $ GeneralizedCylinder#bottomCapScratchFace.->unrefcxx . . $ SoBase#unref(83f5f38750778ac8).();
310 bottomCapScratchFacecxx . . $ GeneralizedCylinder#bottomCapScratchFace. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!;
311 }
312
313 if ( fullProfilecxx . . $ GeneralizedCylinder#fullProfile. != NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! ) {
314 fullProfilecxx . . $ GeneralizedCylinder#fullProfile.->unrefcxx . . $ SoBase#unref(83f5f38750778ac8).();
315 fullProfilecxx . . $ GeneralizedCylinder#fullProfile. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!;
316 }
317 if ( fullCrossSectioncxx . . $ GeneralizedCylinder#fullCrossSection. != NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! ) {
318 fullCrossSectioncxx . . $ GeneralizedCylinder#fullCrossSection.->unrefcxx . . $ SoBase#unref(83f5f38750778ac8).();
319 fullProfilecxx . . $ GeneralizedCylinder#fullProfile. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!;
320 }
321
322 if ( selfSensorcxx . . $ GeneralizedCylinder#selfSensor. != NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! ) {
323 delete selfSensorcxx . . $ GeneralizedCylinder#selfSensor.;
324 selfSensorcxx . . $ GeneralizedCylinder#selfSensor. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!;
325 }
326
327 if ( inputSensorcxx . . $ GeneralizedCylinder#inputSensor. != NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! ) {
328 delete inputSensorcxx . . $ GeneralizedCylinder#inputSensor.;
329 inputSensorcxx . . $ GeneralizedCylinder#inputSensor. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!;
330 }
331 if (myNurbMakercxx . . $ GeneralizedCylinder#myNurbMaker. != NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!)
332 delete myNurbMakercxx . . $ GeneralizedCylinder#myNurbMaker.;
333 }
334
335
336 void
337 GeneralizedCylindercxx . . $ GeneralizedCylinder#::loadRowcxx . . $ GeneralizedCylinder#loadRow(b091e37b266ef0ff).( int rowNum, SbVec3fcxx . . $ SbVec3f# *newCoords )
338 {
339 float scale, paramDist;
340 SbVec3fcxx . . $ SbVec3f# centercxx . . $ SbVec3f#SbVec3f(49f6e7a06ebc5aa8).;
341 SbRotationcxx . . $ SbRotation# rotcxx . . $ SbRotation#SbRotation(49f6e7a06ebc5aa8).;
342 SbRotationcxx . . $ SbRotation# twistRotcxx . . $ SbRotation#SbRotation(49f6e7a06ebc5aa8).;
343
344 scale = fullProfilecxx . . $ GeneralizedCylinder#fullProfile.->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).rowNum][cxx . . $ SbVec3f#`operator[]`(c60a38c584b9a5cc).0];
345 paramDist = (fullProfilecxx . . $ GeneralizedCylinder#fullProfile.->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).rowNum][cxx . . $ SbVec3f#`operator[]`(c60a38c584b9a5cc).1] - profileMinYcxx . . $ GeneralizedCylinder#profileMinY.)
346 * profileOverHeightcxx . . $ GeneralizedCylinder#profileOverHeight.;
347
348 getSpineInfocxx . . $ GeneralizedCylinder#getSpineInfo(5abebf49d1a94fcb).( paramDist, center, rot );
349
350 getTwistInfocxx . . $ GeneralizedCylinder#getTwistInfo(94cc098b5a4f4148).( paramDist, twistRot );
351
352 SbMatrixcxx . . $ SbMatrix# changercxx . . $ SbMatrix#SbMatrix(49f6e7a06ebc5aa8)., tempcxx . . $ SbMatrix#SbMatrix(49f6e7a06ebc5aa8).;
353 changer.setRotatecxx . . $ SbMatrix#setRotate(8b1048b3fc01a89c).( twistRot );
354 temp.setScalecxx . . $ SbMatrix#setScale(9364e6e7bff7660).( scale );
355 changer.multRightcxx . . $ SbMatrix#multRight(5bda0b2cfca989a9).( temp );
356
357 temp.setRotatecxx . . $ SbMatrix#setRotate(8b1048b3fc01a89c).( rot );
358
359 changer.multRightcxx . . $ SbMatrix#multRight(5bda0b2cfca989a9).( temp );
360 temp.setTranslatecxx . . $ SbMatrix#setTranslate(65a601b9d70571d6).( center );
361 changer.multRightcxx . . $ SbMatrix#multRight(5bda0b2cfca989a9).( temp );
362
363 int numCrossPts = fullCrossSectioncxx . . $ GeneralizedCylinder#fullCrossSection.->pointcxx . . $ SoCoordinate3#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).();
364 for ( int i = 0; i < numCrossPts; i++ )
365 changer.multVecMatrixcxx . . $ SbMatrix#multVecMatrix(f4e74898890c8c54).( fullCrossSectioncxx . . $ GeneralizedCylinder#fullCrossSection.->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).i], newCoords[i] );
366 }
367
368 void
369 GeneralizedCylindercxx . . $ GeneralizedCylinder#::loadTextureRowcxx . . $ GeneralizedCylinder#loadTextureRow(f805f18faa37eb4b).( int rowNum, SbVec2fcxx . . $ SbVec2f# *newCoords )
370 {
371 float uVal, vVal;
372 SoMFVec3fcxx . . $ SoMFVec3f# *cSC = &fullCrossSectioncxx . . $ GeneralizedCylinder#fullCrossSection.->pointcxx . . $ SoCoordinate3#point.;
373
374 if ( rowNum == -1 ) {
375 // special case. This is for the caps of the object.
376 for ( int i = 0; i < cSC->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).(); i++ ) {
377 uVal = ( (*cSC)[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).i][cxx . . $ SbVec3f#`operator[]`(c60a38c584b9a5cc).0] - crossSectionMinXcxx . . $ GeneralizedCylinder#crossSectionMinX. ) / crossSectionWidthcxx . . $ GeneralizedCylinder#crossSectionWidth.;
378 vVal = 1 - (( (*cSC)[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).i][cxx . . $ SbVec3f#`operator[]`(c60a38c584b9a5cc).2] - crossSectionMinZcxx . . $ GeneralizedCylinder#crossSectionMinZ.) / crossSectionDepthcxx . . $ GeneralizedCylinder#crossSectionDepth.);
379 newCoords[i].setValuecxx . . $ SbVec2f#setValue(c49b0fdbc63185b4).( uVal, vVal );
380 }
381 return;
382 }
383
384 // vVal is distance parametrically along the spine...
385 vVal = (fullProfilecxx . . $ GeneralizedCylinder#fullProfile.->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).rowNum][cxx . . $ SbVec3f#`operator[]`(c60a38c584b9a5cc).1] - profileMinYcxx . . $ GeneralizedCylinder#profileMinY.)
386 * profileOverHeightcxx . . $ GeneralizedCylinder#profileOverHeight.;
387
388 SbVec3fcxx . . $ SbVec3f# diffcxx . . $ SbVec3f#SbVec3f(49f6e7a06ebc5aa8).;
389 int numCrossPts = cSC->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).();
390 float thisLength = 0.0;
391 for ( int i = 0; i < numCrossPts; i++ ) {
392 if ( i > 0 ) {
393 diff =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). (*cSC)[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).i] -cxx . . $ operator-(af63bf8d0639b76b). (*cSC)[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).i-1];
394 thisLength += diff.lengthcxx . . $ SbVec3f#length(5036dfe8d4170af2).();
395 }
396
397 uVal = thisLength / crossSectionLengthcxx . . $ GeneralizedCylinder#crossSectionLength.;
398
399 newCoords[i].setValuecxx . . $ SbVec2f#setValue(c49b0fdbc63185b4).( uVal, vVal );
400 }
401 }
402
403 void
404 GeneralizedCylindercxx . . $ GeneralizedCylinder#::getSpineInfocxx . . $ GeneralizedCylinder#getSpineInfo(5abebf49d1a94fcb).( float paramDist, SbVec3fcxx . . $ SbVec3f# &center,
405 SbRotationcxx . . $ SbRotation# &rot )
406 {
407 if ( spineLengthcxx . . $ GeneralizedCylinder#spineLength. == 0.0 ) {
408 center =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). SbVec3fcxx . . $ SbVec3f#SbVec3f(bd1040fe176e0786).( 0,paramDist * profileHeightcxx . . $ GeneralizedCylinder#profileHeight.,0);
409 rot =cxx . . $ SbRotation#`operator=`(9cd62c86def1db72). SbRotationcxx . . $ SbRotation#::identitycxx . . $ SbRotation#identity(47c2d41c4a33111a).();
410 return;
411 }
412
413 float desiredDist = paramDist * spineLengthcxx . . $ GeneralizedCylinder#spineLength.;
414
415 float lengthSoFar = 0.0;
416 float nextLength = 0.0;
417 SbVec3fcxx . . $ SbVec3f# p1cxx . . $ SbVec3f#SbVec3f(49f6e7a06ebc5aa8)., p2cxx . . $ SbVec3f#SbVec3f(49f6e7a06ebc5aa8)., diffcxx . . $ SbVec3f#SbVec3f(49f6e7a06ebc5aa8)., norm1cxx . . $ SbVec3f#SbVec3f(49f6e7a06ebc5aa8)., norm2cxx . . $ SbVec3f#SbVec3f(49f6e7a06ebc5aa8)., normcxx . . $ SbVec3f#SbVec3f(49f6e7a06ebc5aa8).;
418 SbVec3fcxx . . $ SbVec3f# zAxiscxx . . $ SbVec3f#SbVec3f(bd1040fe176e0786).( 0, 0, 1 );
419
420 SoCoordinate3cxx . . $ SoCoordinate3# *spinC = SO_GET_PARTcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoBaseKit.h:420:9`!( this, "spineCoords", SoCoordinate3 );
421
422 if ( paramDist > 1.0 ) {
423 int last = spinC->pointcxx . . $ SoCoordinate3#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() - 1;
424 center =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). spinC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8). last ];
425 rot =cxx . . $ SbRotation#`operator=`(9cd62c86def1db72). getSpinePointRotationcxx . . $ GeneralizedCylinder#getSpinePointRotation(c8bdb7a5b560c5d0).( last, last, 0.0 );
426 return;
427 }
428 else if ( paramDist < 0.0 ) {
429 center =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). spinC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8). 0 ];
430 rot =cxx . . $ SbRotation#`operator=`(9cd62c86def1db72). getSpinePointRotationcxx . . $ GeneralizedCylinder#getSpinePointRotation(c8bdb7a5b560c5d0).( 0, 0, 0.0 );
431 return;
432 }
433
434 for ( int i = 0; i < spinC->pointcxx . . $ SoCoordinate3#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() - 1; i++ ) {
435
436 p1 =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). spinC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).i];
437 p2 =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). spinC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).i+1];
438 diff =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). p2 -cxx . . $ operator-(af63bf8d0639b76b). p1;
439 nextLength = lengthSoFar + diff.lengthcxx . . $ SbVec3f#length(5036dfe8d4170af2).();
440
441 if ( desiredDist >= lengthSoFar && desiredDist <= nextLength ) {
442 float fraction = (desiredDist - lengthSoFar)
443 / (nextLength - lengthSoFar);
444 center =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). p1 +cxx . . $ operator+(af63bf8d0639b76b). fraction *cxx . . $ `operator*`(c40767b2d90b93cf). ( p2 -cxx . . $ operator-(af63bf8d0639b76b). p1 );
445 rot =cxx . . $ SbRotation#`operator=`(9cd62c86def1db72). getSpinePointRotationcxx . . $ GeneralizedCylinder#getSpinePointRotation(c8bdb7a5b560c5d0).( i, i+1, fraction );
446 return;
447 }
448
449 lengthSoFar = nextLength;
450 }
451 }
452
453 SbRotationcxx . . $ SbRotation#
454 GeneralizedCylindercxx . . $ GeneralizedCylinder#::getSpinePointRotationcxx . . $ GeneralizedCylinder#getSpinePointRotation(c8bdb7a5b560c5d0).(int ind0, int ind1, float paramDist )
455 {
456 SbRotationcxx . . $ SbRotation# rot0cxx . . $ SbRotation#SbRotation(49f6e7a06ebc5aa8)., rot1cxx . . $ SbRotation#SbRotation(49f6e7a06ebc5aa8)., interpedRotcxx . . $ SbRotation#SbRotation(49f6e7a06ebc5aa8).;
457
458 if ( ind0 == ind1 )
459 return( spineKeyPointRotationscxx . . $ GeneralizedCylinder#spineKeyPointRotations.[ind0]);
460 else {
461 rot0 =cxx . . $ SbRotation#`operator=`(9cd62c86def1db72). spineKeyPointRotationscxx . . $ GeneralizedCylinder#spineKeyPointRotations.[ind0];
462 rot1 =cxx . . $ SbRotation#`operator=`(9cd62c86def1db72). spineKeyPointRotationscxx . . $ GeneralizedCylinder#spineKeyPointRotations.[ind1];
463
464 interpedRot =cxx . . $ SbRotation#`operator=`(9cd62c86def1db72). SbRotationcxx . . $ SbRotation#::slerpcxx . . $ SbRotation#slerp(516bea3fee0bfab9).( rot0, rot1, paramDist );
465
466 return interpedRot;
467 }
468 }
469
470 void
471 GeneralizedCylindercxx . . $ GeneralizedCylinder#::initSpineKeyPointRotationscxx . . $ GeneralizedCylinder#initSpineKeyPointRotations(49f6e7a06ebc5aa8).()
472 {
473 SoCoordinate3cxx . . $ SoCoordinate3# *spinC = SO_GET_PARTcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoBaseKit.h:420:9`!( this, "spineCoords", SoCoordinate3 );
474
475 if ( spinC->pointcxx . . $ SoCoordinate3#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() > numAllocedSpineKeyRotscxx . . $ GeneralizedCylinder#numAllocedSpineKeyRots. ) {
476 if ( spineKeyPointRotationscxx . . $ GeneralizedCylinder#spineKeyPointRotations. != NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! )
477 delete [] spineKeyPointRotationscxx . . $ GeneralizedCylinder#spineKeyPointRotations.;
478 spineKeyPointRotationscxx . . $ GeneralizedCylinder#spineKeyPointRotations. = new SbRotationcxx . . $ SbRotation#SbRotation(49f6e7a06ebc5aa8).[spinC->pointcxx . . $ SoCoordinate3#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).()];
479 numAllocedSpineKeyRotscxx . . $ GeneralizedCylinder#numAllocedSpineKeyRots. = spinC->pointcxx . . $ SoCoordinate3#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).();
480 }
481
482 if (spinC->pointcxx . . $ SoCoordinate3#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() <= 0)
483 return;
484
485 if (spinC->pointcxx . . $ SoCoordinate3#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() == 1) {
486 spineKeyPointRotationscxx . . $ GeneralizedCylinder#spineKeyPointRotations.[0] =cxx . . $ SbRotation#`operator=`(9cd62c86def1db72). SbRotationcxx . . $ SbRotation#::identitycxx . . $ SbRotation#identity(47c2d41c4a33111a).();
487 return;
488 }
489
490 SbVec3fcxx . . $ SbVec3f# xAxiscxx . . $ SbVec3f#SbVec3f(bd1040fe176e0786).( 1, 0, 0 );
491 SbVec3fcxx . . $ SbVec3f# yAxiscxx . . $ SbVec3f#SbVec3f(bd1040fe176e0786).( 0, 1, 0 );
492 SbVec3fcxx . . $ SbVec3f# zAxiscxx . . $ SbVec3f#SbVec3f(bd1040fe176e0786).( 0, 0, 1 );
493 SbVec3fcxx . . $ SbVec3f# zeroVeccxx . . $ SbVec3f#SbVec3f(bd1040fe176e0786).( 0, 0, 0 );
494 SbVec3fcxx . . $ SbVec3f# diff1cxx . . $ SbVec3f#SbVec3f(49f6e7a06ebc5aa8)., diff2cxx . . $ SbVec3f#SbVec3f(49f6e7a06ebc5aa8).;
495
496 if (spinC->pointcxx . . $ SoCoordinate3#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() == 2) {
497 diff1 =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). spinC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).1] -cxx . . $ operator-(af63bf8d0639b76b). spinC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).0];
498 diff1.normalizecxx . . $ SbVec3f#normalize(9b8c9e39889c762c).();
499 spineKeyPointRotationscxx . . $ GeneralizedCylinder#spineKeyPointRotations.[0].setValuecxx . . $ SbRotation#setValue(f162005ec5d48f00).( yAxis, diff1 );
500 spineKeyPointRotationscxx . . $ GeneralizedCylinder#spineKeyPointRotations.[1] =cxx . . $ SbRotation#`operator=`(9cd62c86def1db72). spineKeyPointRotationscxx . . $ GeneralizedCylinder#spineKeyPointRotations.[0];
501 return;
502 }
503
504 // More than two points...
505 SbVec3fcxx . . $ SbVec3f# rotatedXcxx . . $ SbVec3f#SbVec3f(49f6e7a06ebc5aa8)., rotatedYcxx . . $ SbVec3f#SbVec3f(49f6e7a06ebc5aa8)., rotatedZcxx . . $ SbVec3f#SbVec3f(49f6e7a06ebc5aa8)., prevRotatedZcxx . . $ SbVec3f#SbVec3f(49f6e7a06ebc5aa8).;
506 SbVec3fcxx . . $ SbVec3f# p0cxx . . $ SbVec3f#SbVec3f(49f6e7a06ebc5aa8)., p1cxx . . $ SbVec3f#SbVec3f(49f6e7a06ebc5aa8)., p2cxx . . $ SbVec3f#SbVec3f(49f6e7a06ebc5aa8).;
507 int lastInd = spinC->pointcxx . . $ SoCoordinate3#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() - 1;
508
509 // Find rotation for First point...
510
511 // First, treat case where spine is a closed polygon
512 if ( spineClosedcxx . . $ GeneralizedCylinder#spineClosed..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() ) {
513 // Z axis is perp to plane formed by three points around p[0]
514 diff1 =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). spinC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).lastInd-1] -cxx . . $ operator-(af63bf8d0639b76b). spinC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).0];
515 diff2 =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). spinC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).1] -cxx . . $ operator-(af63bf8d0639b76b). spinC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).0];
516 rotatedZ =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). diff2.crosscxx . . $ SbVec3f#cross(d67ad7d0c0b29ebb).( diff1 );
517 // If 3 pts colinear, don't do this, but go on to other algorithm...
518 if ( rotatedZ !=cxx . . $ `operator!=`(648f52454fd9f27). zeroVec ) {
519 rotatedZ.normalizecxx . . $ SbVec3f#normalize(9b8c9e39889c762c).();
520 // But make it lean towards the Z axis of the previous point.
521 if ( rotatedZ.dotcxx . . $ SbVec3f#dot(adcfb95606509c95).( zAxis ) < 0 )
522 rotatedZ *=cxx . . $ SbVec3f#`operator*=`(3aaca777b5795e29). -1.0;
523
524 // X axis is cross product of (nextPt-prevPt) with Z axis.
525 diff1 =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). spinC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).1] -cxx . . $ operator-(af63bf8d0639b76b). spinC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).lastInd-1];
526 rotatedX =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). diff1.crosscxx . . $ SbVec3f#cross(d67ad7d0c0b29ebb).( rotatedZ );
527 rotatedX.normalizecxx . . $ SbVec3f#normalize(9b8c9e39889c762c).();
528
529 rotatedY =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). rotatedZ.crosscxx . . $ SbVec3f#cross(d67ad7d0c0b29ebb).( rotatedX );
530 }
531 }
532
533 // Spine not closed, or it was closed but couldn't get rotation...
534 if ( rotatedZ ==cxx . . $ `operator==`(648f52454fd9f27). zeroVec || !spineClosedcxx . . $ GeneralizedCylinder#spineClosed..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() ) {
535 // Y axis just points from point 0 to first point that differs.
536 int i = 0;
537 p0 =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). p1 =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). spinC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).i++];
538 while (p0 ==cxx . . $ `operator==`(648f52454fd9f27). p1 && i <= lastInd )
539 p1 =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). spinC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).i++];
540 if ( p0 ==cxx . . $ `operator==`(648f52454fd9f27). p1 ) {
541 // all points were the same. Make everyone have no rotation.
542 for ( int j = 0; j <= lastInd; j++ ) {
543 spineKeyPointRotationscxx . . $ GeneralizedCylinder#spineKeyPointRotations.[j] =cxx . . $ SbRotation#`operator=`(9cd62c86def1db72). SbRotationcxx . . $ SbRotation#::identitycxx . . $ SbRotation#identity(47c2d41c4a33111a).();
544 }
545 return;
546 }
547 rotatedY =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). p1 -cxx . . $ operator-(af63bf8d0639b76b). p0;
548 rotatedY.normalizecxx . . $ SbVec3f#normalize(9b8c9e39889c762c).();
549
550 // Z axis is perpendicular to plane formed by 1st three points.
551 // Repeat as long as the two vectors are colinear.
552 diff1 =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). p0 -cxx . . $ operator-(af63bf8d0639b76b). p1;
553 diff1.normalizecxx . . $ SbVec3f#normalize(9b8c9e39889c762c).();
554 rotatedZ =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). zeroVec;
555 while (rotatedZ ==cxx . . $ `operator==`(648f52454fd9f27). zeroVec && i <= lastInd ) {
556 p2 =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). spinC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).i++];
557 diff2 =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). p2 -cxx . . $ operator-(af63bf8d0639b76b). p1;
558 diff2.normalizecxx . . $ SbVec3f#normalize(9b8c9e39889c762c).();
559 rotatedZ =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). diff2.crosscxx . . $ SbVec3f#cross(d67ad7d0c0b29ebb).( diff1 );
560 }
561 if ( rotatedZ ==cxx . . $ `operator==`(648f52454fd9f27). zeroVec ) {
562 // all points coplanar. Make everyone have the same rotation.
563 for ( int j = 0; j <= lastInd; j++ ) {
564 spineKeyPointRotationscxx . . $ GeneralizedCylinder#spineKeyPointRotations.[j].setValuecxx . . $ SbRotation#setValue(f162005ec5d48f00).( yAxis, rotatedY );
565 }
566 return;
567 }
568 rotatedZ.normalizecxx . . $ SbVec3f#normalize(9b8c9e39889c762c).();
569 // But make it lean towards positive Z each time.
570 if ( rotatedZ.dotcxx . . $ SbVec3f#dot(adcfb95606509c95).( zAxis ) < 0 )
571 rotatedZ *=cxx . . $ SbVec3f#`operator*=`(3aaca777b5795e29). -1.0;
572
573 // X axis is calculated based on Y and Z
574 rotatedX =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). rotatedY.crosscxx . . $ SbVec3f#cross(d67ad7d0c0b29ebb).( rotatedZ );
575 }
576
577 SbMatrixcxx . . $ SbMatrix# firstAnswerMatcxx . . $ SbMatrix#SbMatrix(2baec959f14975bf).(rotatedX[cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).0],rotatedX[cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).1],rotatedX[cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).2],0,
578 rotatedY[cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).0],rotatedY[cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).1],rotatedY[cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).2],0,
579 rotatedZ[cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).0],rotatedZ[cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).1],rotatedZ[cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).2],0,
580 0 , 0 , 0 ,1);
581 spineKeyPointRotationscxx . . $ GeneralizedCylinder#spineKeyPointRotations.[0].setValuecxx . . $ SbRotation#setValue(2d2f94988ce77066).(firstAnswerMat);
582
583
584 prevRotatedZ =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). rotatedZ;
585
586 // Find rotation for all but first and last points...
587 for ( int ind = 1; ind < lastInd; ind++ ) {
588 // Z axis is perpendicular to plane formed by three points surrounding
589 // This one.
590 diff1 =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). spinC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).ind-1] -cxx . . $ operator-(af63bf8d0639b76b). spinC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).ind];
591 diff2 =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). spinC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).ind+1] -cxx . . $ operator-(af63bf8d0639b76b). spinC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).ind];
592 diff1.normalizecxx . . $ SbVec3f#normalize(9b8c9e39889c762c).();
593 diff2.normalizecxx . . $ SbVec3f#normalize(9b8c9e39889c762c).();
594 rotatedZ =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). diff2.crosscxx . . $ SbVec3f#cross(d67ad7d0c0b29ebb).( diff1 );
595 if (rotatedZ ==cxx . . $ `operator==`(648f52454fd9f27). zeroVec) // if colinear, use previous rotatedZ
596 rotatedZ =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). prevRotatedZ;
597 rotatedZ.normalizecxx . . $ SbVec3f#normalize(9b8c9e39889c762c).();
598 // But make it lean towards the Z axis of the previous point.
599 if ( rotatedZ.dotcxx . . $ SbVec3f#dot(adcfb95606509c95).( prevRotatedZ ) < 0.0 )
600 rotatedZ *=cxx . . $ SbVec3f#`operator*=`(3aaca777b5795e29). -1.0;
601
602 // X axis is cross product of (nextPt-prevPt) with Z axis.
603 diff1 =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). spinC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).ind+1] -cxx . . $ operator-(af63bf8d0639b76b). spinC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).ind-1];
604 if ( diff1 !=cxx . . $ `operator!=`(648f52454fd9f27). zeroVec ) {
605 diff1.normalizecxx . . $ SbVec3f#normalize(9b8c9e39889c762c).();
606 rotatedX =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). diff1.crosscxx . . $ SbVec3f#cross(d67ad7d0c0b29ebb).( rotatedZ );
607 rotatedX.normalizecxx . . $ SbVec3f#normalize(9b8c9e39889c762c).();
608 }
609 // if diff1 = 0, just use previous value for rotatedX
610
611 // Y axis is calculated based on X and Z
612 rotatedY =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). rotatedZ.crosscxx . . $ SbVec3f#cross(d67ad7d0c0b29ebb).( rotatedX );
613
614 SbMatrixcxx . . $ SbMatrix# answerMatcxx . . $ SbMatrix#SbMatrix(2baec959f14975bf).(rotatedX[cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).0],rotatedX[cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).1],rotatedX[cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).2],0,
615 rotatedY[cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).0],rotatedY[cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).1],rotatedY[cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).2],0,
616 rotatedZ[cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).0],rotatedZ[cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).1],rotatedZ[cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).2],0,
617 0 , 0 , 0 ,1);
618 spineKeyPointRotationscxx . . $ GeneralizedCylinder#spineKeyPointRotations.[ind].setValuecxx . . $ SbRotation#setValue(2d2f94988ce77066).(answerMat);
619
620 prevRotatedZ =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). rotatedZ;
621 }
622
623 // Find rotation for Last point...
624 if ( spineClosedcxx . . $ GeneralizedCylinder#spineClosed..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() ) {
625 spineKeyPointRotationscxx . . $ GeneralizedCylinder#spineKeyPointRotations.[lastInd] =cxx . . $ SbRotation#`operator=`(9cd62c86def1db72). spineKeyPointRotationscxx . . $ GeneralizedCylinder#spineKeyPointRotations.[0];
626 }
627 else {
628 // Y axis just points from next-to-last point to last point
629 diff1 =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). spinC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).lastInd] -cxx . . $ operator-(af63bf8d0639b76b). spinC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).lastInd - 1];
630 if (diff1 !=cxx . . $ `operator!=`(648f52454fd9f27). zeroVec )
631 rotatedY =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). diff1;
632 // otherwise use previous value...
633 rotatedY.normalizecxx . . $ SbVec3f#normalize(9b8c9e39889c762c).();
634
635 // Z axis is same as previous value.
636 rotatedZ =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). prevRotatedZ;
637
638 // X axis is calculated based on Y and Z
639 rotatedX =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). rotatedY.crosscxx . . $ SbVec3f#cross(d67ad7d0c0b29ebb).( rotatedZ );
640
641 SbMatrixcxx . . $ SbMatrix# lastAnswerMatcxx . . $ SbMatrix#SbMatrix(2baec959f14975bf).(rotatedX[cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).0],rotatedX[cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).1],rotatedX[cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).2],0,
642 rotatedY[cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).0],rotatedY[cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).1],rotatedY[cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).2],0,
643 rotatedZ[cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).0],rotatedZ[cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).1],rotatedZ[cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).2],0,
644 0 , 0 , 0 ,1);
645 spineKeyPointRotationscxx . . $ GeneralizedCylinder#spineKeyPointRotations.[lastInd].setValuecxx . . $ SbRotation#setValue(2d2f94988ce77066).(lastAnswerMat);
646 }
647 }
648
649 void
650 GeneralizedCylindercxx . . $ GeneralizedCylinder#::getTwistInfocxx . . $ GeneralizedCylinder#getTwistInfo(94cc098b5a4f4148).( float paramDist, SbRotationcxx . . $ SbRotation# &twistRot )
651 {
652 // X coordinate determines amount of twist
653
654 float desiredHeight;
655
656 desiredHeight = paramDist * (twistMaxYcxx . . $ GeneralizedCylinder#twistMaxY. - twistMinYcxx . . $ GeneralizedCylinder#twistMinY.) + twistMinYcxx . . $ GeneralizedCylinder#twistMinY.;
657
658 if (desiredHeight < twistMinYcxx . . $ GeneralizedCylinder#twistMinY.)
659 desiredHeight = twistMinYcxx . . $ GeneralizedCylinder#twistMinY.;
660 else if (desiredHeight > twistMaxYcxx . . $ GeneralizedCylinder#twistMaxY.)
661 desiredHeight = twistMaxYcxx . . $ GeneralizedCylinder#twistMaxY.;
662
663 float thisHeight, nextHeight, thisAngle, nextAngle;
664 float angle, fraction;
665 SbVec3fcxx . . $ SbVec3f# yAxiscxx . . $ SbVec3f#SbVec3f(bd1040fe176e0786).( 0, 1, 0 );
666
667 SoCoordinate3cxx . . $ SoCoordinate3# *twisC = SO_GET_PARTcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoBaseKit.h:420:9`!( this, "twistCoords", SoCoordinate3 );
668
669 for ( int i = 0; i < twisC->pointcxx . . $ SoCoordinate3#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() - 1; i++ ) {
670
671 thisHeight = twisC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).i][cxx . . $ SbVec3f#`operator[]`(c60a38c584b9a5cc).1];
672 nextHeight = twisC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).i+1][cxx . . $ SbVec3f#`operator[]`(c60a38c584b9a5cc).1];
673
674 if ( desiredHeight >= thisHeight && desiredHeight <= nextHeight ) {
675 fraction = (desiredHeight - thisHeight) / (nextHeight - thisHeight);
676 thisAngle = twisC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).i][cxx . . $ SbVec3f#`operator[]`(c60a38c584b9a5cc).0];
677 nextAngle = twisC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).i+1][cxx . . $ SbVec3f#`operator[]`(c60a38c584b9a5cc).0];
678 angle = thisAngle + fraction * ( nextAngle - thisAngle );
679
680 twistRot =cxx . . $ SbRotation#`operator=`(9cd62c86def1db72). SbRotationcxx . . $ SbRotation#SbRotation(91fd4afec15735a5).( yAxis, angle );
681 return;
682 }
683 if ( desiredHeight >= nextHeight && desiredHeight <= thisHeight ) {
684 fraction = (desiredHeight - nextHeight) / (thisHeight - nextHeight);
685 thisAngle = twisC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).i][cxx . . $ SbVec3f#`operator[]`(c60a38c584b9a5cc).0];
686 nextAngle = twisC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).i+1][cxx . . $ SbVec3f#`operator[]`(c60a38c584b9a5cc).0];
687 angle = nextAngle + fraction * ( thisAngle - nextAngle );
688
689 twistRot =cxx . . $ SbRotation#`operator=`(9cd62c86def1db72). SbRotationcxx . . $ SbRotation#SbRotation(91fd4afec15735a5).( yAxis, angle );
690 return;
691 }
692 }
693
694 twistRot =cxx . . $ SbRotation#`operator=`(9cd62c86def1db72). SbRotationcxx . . $ SbRotation#::identitycxx . . $ SbRotation#identity(47c2d41c4a33111a).();
695 return;
696 }
697
698 void
699 GeneralizedCylindercxx . . $ GeneralizedCylinder#::initUpdateInfocxx . . $ GeneralizedCylinder#initUpdateInfo(49f6e7a06ebc5aa8).()
700 {
701 profileMinYcxx . . $ GeneralizedCylinder#profileMinY. = 100000000;
702 float maxY = -100000000;
703
704 float val;
705
706 SoCoordinate3cxx . . $ SoCoordinate3# *profC = SO_GET_PARTcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoBaseKit.h:420:9`!( this, "profileCoords", SoCoordinate3 );
707 SoCoordinate3cxx . . $ SoCoordinate3# *crosC = SO_GET_PARTcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoBaseKit.h:420:9`!( this, "crossSectionCoords", SoCoordinate3 );
708 SoCoordinate3cxx . . $ SoCoordinate3# *spinC = SO_GET_PARTcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoBaseKit.h:420:9`!( this, "spineCoords", SoCoordinate3 );
709 SoCoordinate3cxx . . $ SoCoordinate3# *twisC = SO_GET_PARTcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoBaseKit.h:420:9`!( this, "twistCoords", SoCoordinate3 );
710
711 int i;
712 for ( i = 0; i < profC->pointcxx . . $ SoCoordinate3#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).(); i++ ) {
713 val = profC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).i][cxx . . $ SbVec3f#`operator[]`(c60a38c584b9a5cc).1];
714 if ( profileMinYcxx . . $ GeneralizedCylinder#profileMinY. > val )
715 profileMinYcxx . . $ GeneralizedCylinder#profileMinY. = val;
716 if ( maxY < val )
717 maxY = val;
718 }
719
720 if ( maxY == profileMinYcxx . . $ GeneralizedCylinder#profileMinY. )
721 maxY += 1.0;
722 profileHeightcxx . . $ GeneralizedCylinder#profileHeight. = maxY - profileMinYcxx . . $ GeneralizedCylinder#profileMinY.;
723 profileOverHeightcxx . . $ GeneralizedCylinder#profileOverHeight. = 1.0 / profileHeightcxx . . $ GeneralizedCylinder#profileHeight.;
724
725 //Spine length, and parametric spine distance of each point on spine.
726 if ( spineParamDistancescxx . . $ GeneralizedCylinder#spineParamDistances. != NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! )
727 delete [] spineParamDistancescxx . . $ GeneralizedCylinder#spineParamDistances.;
728 spineParamDistancescxx . . $ GeneralizedCylinder#spineParamDistances. = new float[spinC->pointcxx . . $ SoCoordinate3#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).()];
729 spineLengthcxx . . $ GeneralizedCylinder#spineLength. = 0.0;
730 spineParamDistancescxx . . $ GeneralizedCylinder#spineParamDistances.[0] = 0;
731 SbVec3fcxx . . $ SbVec3f# diffcxx . . $ SbVec3f#SbVec3f(49f6e7a06ebc5aa8).;
732 for ( i = 0; i < spinC->pointcxx . . $ SoCoordinate3#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() - 1; i++ ) {
733 diff =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). spinC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).i+1] -cxx . . $ operator-(af63bf8d0639b76b). spinC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).i];
734 spineLengthcxx . . $ GeneralizedCylinder#spineLength. += diff.lengthcxx . . $ SbVec3f#length(5036dfe8d4170af2).();
735 spineParamDistancescxx . . $ GeneralizedCylinder#spineParamDistances.[i+1] = spineLengthcxx . . $ GeneralizedCylinder#spineLength.; // absolute distance
736 }
737 if ( spineLengthcxx . . $ GeneralizedCylinder#spineLength. != 0.0 ) {
738 // convert absolute distance into parametric distance.
739 for ( i = 0; i < spinC->pointcxx . . $ SoCoordinate3#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).(); i++ )
740 spineParamDistancescxx . . $ GeneralizedCylinder#spineParamDistances.[i] = spineParamDistancescxx . . $ GeneralizedCylinder#spineParamDistances.[i] / spineLengthcxx . . $ GeneralizedCylinder#spineLength.;
741 }
742
743 // Rotations at key points of the spine...
744 initSpineKeyPointRotationscxx . . $ GeneralizedCylinder#initSpineKeyPointRotations(49f6e7a06ebc5aa8).();
745
746 //Profile length
747 profileLengthcxx . . $ GeneralizedCylinder#profileLength. = 0.0;
748 for ( i = 0; i < profC->pointcxx . . $ SoCoordinate3#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() - 1; i++ ) {
749 diff =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). profC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).i+1] -cxx . . $ operator-(af63bf8d0639b76b). profC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).i];
750 profileLengthcxx . . $ GeneralizedCylinder#profileLength. += diff.lengthcxx . . $ SbVec3f#length(5036dfe8d4170af2).();
751 }
752
753 //CrossSection length
754 crossSectionLengthcxx . . $ GeneralizedCylinder#crossSectionLength. = 0.0;
755 for ( i = 0; i < crosC->pointcxx . . $ SoCoordinate3#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() - 1; i++ ) {
756 diff =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). crosC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).i+1] -cxx . . $ operator-(af63bf8d0639b76b). crosC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).i];
757 crossSectionLengthcxx . . $ GeneralizedCylinder#crossSectionLength. += diff.lengthcxx . . $ SbVec3f#length(5036dfe8d4170af2).();
758 }
759
760 float xVal, zVal;
761 float maxX = -100000000;
762 float maxZ = -100000000;
763 crossSectionMinXcxx . . $ GeneralizedCylinder#crossSectionMinX. = crossSectionMinZcxx . . $ GeneralizedCylinder#crossSectionMinZ. = 100000000;
764
765 for ( i = 0; i < crosC->pointcxx . . $ SoCoordinate3#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).(); i++ ) {
766 xVal = crosC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).i][cxx . . $ SbVec3f#`operator[]`(c60a38c584b9a5cc).0];
767 if ( crossSectionMinXcxx . . $ GeneralizedCylinder#crossSectionMinX. > xVal )
768 crossSectionMinXcxx . . $ GeneralizedCylinder#crossSectionMinX. = xVal;
769 if ( maxX < xVal )
770 maxX = xVal;
771
772 zVal = crosC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).i][cxx . . $ SbVec3f#`operator[]`(c60a38c584b9a5cc).2];
773 if ( maxZ < zVal )
774 maxZ = zVal;
775 if ( crossSectionMinZcxx . . $ GeneralizedCylinder#crossSectionMinZ. > zVal )
776 crossSectionMinZcxx . . $ GeneralizedCylinder#crossSectionMinZ. = zVal;
777 }
778
779 if ( maxX == crossSectionMinXcxx . . $ GeneralizedCylinder#crossSectionMinX. )
780 maxX += 1.0;
781 if ( maxZ == crossSectionMinZcxx . . $ GeneralizedCylinder#crossSectionMinZ. )
782 maxZ += 1.0;
783 crossSectionWidthcxx . . $ GeneralizedCylinder#crossSectionWidth. = maxX - crossSectionMinXcxx . . $ GeneralizedCylinder#crossSectionMinX.;
784 crossSectionDepthcxx . . $ GeneralizedCylinder#crossSectionDepth. = maxZ - crossSectionMinZcxx . . $ GeneralizedCylinder#crossSectionMinZ.;
785
786
787
788 twistMinYcxx . . $ GeneralizedCylinder#twistMinY. = 100000000;
789 twistMaxYcxx . . $ GeneralizedCylinder#twistMaxY. = -100000000;
790 for ( i = 0; i < twisC->pointcxx . . $ SoCoordinate3#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).(); i++ ) {
791 val = twisC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).i][cxx . . $ SbVec3f#`operator[]`(c60a38c584b9a5cc).1];
792 if ( twistMinYcxx . . $ GeneralizedCylinder#twistMinY. > val )
793 twistMinYcxx . . $ GeneralizedCylinder#twistMinY. = val;
794 if ( twistMaxYcxx . . $ GeneralizedCylinder#twistMaxY. < val )
795 twistMaxYcxx . . $ GeneralizedCylinder#twistMaxY. = val;
796 val = twisC->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).i][cxx . . $ SbVec3f#`operator[]`(c60a38c584b9a5cc).0];
797 }
798
799 calculateFullProfilecxx . . $ GeneralizedCylinder#calculateFullProfile(49f6e7a06ebc5aa8).();
800 calculateFullCrossSectioncxx . . $ GeneralizedCylinder#calculateFullCrossSection(49f6e7a06ebc5aa8).();
801 }
802
803 //
804 // Given a set of 2D profile coordinates (the z-coordinate of this
805 // Vec3f field is ignored), this creates a generalized cylinder
806 // If passed NULL, this routine will use the last coordinates passed
807 // (this is used when the number of sides in the generalized cylinder is
808 // changed).
809 //
810
811 void
812 GeneralizedCylindercxx . . $ GeneralizedCylinder#::updateSurfacecxx . . $ GeneralizedCylinder#updateSurface(49f6e7a06ebc5aa8).()
813 {
814 initUpdateInfocxx . . $ GeneralizedCylinder#initUpdateInfo(49f6e7a06ebc5aa8).();
815
816 const SoMFVec3fcxx . . $ SoMFVec3f# *prof = &fullProfilecxx . . $ GeneralizedCylinder#fullProfile.->pointcxx . . $ SoCoordinate3#point.;
817 const SoMFVec3fcxx . . $ SoMFVec3f# *cross = &fullCrossSectioncxx . . $ GeneralizedCylinder#fullCrossSection.->pointcxx . . $ SoCoordinate3#point.;
818
819 int numRows = prof->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).();
820 int numCols = cross->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).();
821
822 SoFaceSetcxx . . $ SoFaceSet# *myFaceSet = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!;
823 SoTriangleStripSetcxx . . $ SoTriangleStripSet# *myTStripSet = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!;
824 SoQuadMeshcxx . . $ SoQuadMesh# *myQMesh = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!;
825 SoGroupcxx . . $ SoGroup# *myNurbsSurfs = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!;
826
827 GeneralizedCylindercxx . . $ GeneralizedCylinder#::RenderShapeTypecxx . . $ GeneralizedCylinder#RenderShapeType# sType
828 = (GeneralizedCylindercxx . . $ GeneralizedCylinder#::RenderShapeTypecxx . . $ GeneralizedCylinder#RenderShapeType#)renderShapeTypecxx . . $ GeneralizedCylinder#renderShapeType..getValuecxx . . $ SoSFEnum#getValue(455f465bc33b4cdf).();
829
830 // DEAL WITH SHAPE HINTS
831 SoShapeHintscxx . . $ SoShapeHints# *hints = (SoShapeHintscxx . . $ SoShapeHints# *) getPartcxx . . $ SoBaseKit#getPart(795225bb0fb495d5).("shapeHints"cxx . . $ SbName#SbName(85c52e162fed56f9)., FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`!);
832 if (hints) {
833 switch(sType) {
834 case BEZIER_SURFACEcxx . . $ GeneralizedCylinder#BEZIER_SURFACE.:
835 case CUBIC_SPLINE_SURFACEcxx . . $ GeneralizedCylinder#CUBIC_SPLINE_SURFACE.:
836 case CUBIC_TO_EDGE_SURFACEcxx . . $ GeneralizedCylinder#CUBIC_TO_EDGE_SURFACE.:
837 hints->vertexOrderingcxx . . $ SoShapeHints#vertexOrdering. =cxx . . $ SoSFEnum#`operator=`(7864480464b09eea). SoShapeHintscxx . . $ SoShapeHints#::UNKNOWN_ORDERINGcxx . . $ SoShapeHints#UNKNOWN_ORDERING.;
838 break;
839 case FACE_SETcxx . . $ GeneralizedCylinder#FACE_SET.:
840 case TRIANGLE_STRIP_SETcxx . . $ GeneralizedCylinder#TRIANGLE_STRIP_SET.:
841 case QUAD_MESHcxx . . $ GeneralizedCylinder#QUAD_MESH.:
842 hints->vertexOrderingcxx . . $ SoShapeHints#vertexOrdering. =cxx . . $ SoSFEnum#`operator=`(7864480464b09eea). SoShapeHintscxx . . $ SoShapeHints#::COUNTERCLOCKWISEcxx . . $ SoShapeHints#COUNTERCLOCKWISE.;
843 break;
844 }
845 }
846
847 SoCoordinate3cxx . . $ SoCoordinate3# *coords = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!;
848
849 // DELETE AND GET THE CORRECT NODES.
850 if (withSidescxx . . $ GeneralizedCylinder#withSides..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() == FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! ) {
851 setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).( "faceSet"cxx . . $ SbName#SbName(85c52e162fed56f9)., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! );
852 setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).( "triangleStripSet"cxx . . $ SbName#SbName(85c52e162fed56f9)., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! );
853 setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).( "quadMesh"cxx . . $ SbName#SbName(85c52e162fed56f9)., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! );
854 setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).( "nurbsSurfaceGroup"cxx . . $ SbName#SbName(85c52e162fed56f9)., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! );
855 setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).( "coords"cxx . . $ SbName#SbName(85c52e162fed56f9)., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! );
856 }
857 else {
858 switch(sType) {
859 case FACE_SETcxx . . $ GeneralizedCylinder#FACE_SET.:
860 myFaceSet = SO_GET_PARTcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoBaseKit.h:420:9`!( this, "faceSet", SoFaceSet );
861 setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).( "triangleStripSet"cxx . . $ SbName#SbName(85c52e162fed56f9)., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! );
862 setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).( "quadMesh"cxx . . $ SbName#SbName(85c52e162fed56f9)., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! );
863 setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).( "nurbsSurfaceGroup"cxx . . $ SbName#SbName(85c52e162fed56f9)., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! );
864 break;
865 case TRIANGLE_STRIP_SETcxx . . $ GeneralizedCylinder#TRIANGLE_STRIP_SET.:
866 myTStripSet
867 = SO_GET_PARTcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoBaseKit.h:420:9`!(this,"triangleStripSet", SoTriangleStripSet );
868 setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).( "faceSet"cxx . . $ SbName#SbName(85c52e162fed56f9)., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! );
869 setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).( "quadMesh"cxx . . $ SbName#SbName(85c52e162fed56f9)., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! );
870 setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).( "nurbsSurfaceGroup"cxx . . $ SbName#SbName(85c52e162fed56f9)., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! );
871 break;
872 case QUAD_MESHcxx . . $ GeneralizedCylinder#QUAD_MESH.:
873 myQMesh = SO_GET_PARTcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoBaseKit.h:420:9`!( this, "quadMesh", SoQuadMesh );
874 setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).( "faceSet"cxx . . $ SbName#SbName(85c52e162fed56f9)., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! );
875 setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).( "triangleStripSet"cxx . . $ SbName#SbName(85c52e162fed56f9)., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! );
876 setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).( "nurbsSurfaceGroup"cxx . . $ SbName#SbName(85c52e162fed56f9)., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! );
877 break;
878 case BEZIER_SURFACEcxx . . $ GeneralizedCylinder#BEZIER_SURFACE.:
879 case CUBIC_SPLINE_SURFACEcxx . . $ GeneralizedCylinder#CUBIC_SPLINE_SURFACE.:
880 case CUBIC_TO_EDGE_SURFACEcxx . . $ GeneralizedCylinder#CUBIC_TO_EDGE_SURFACE.:
881 myNurbsSurfs = SO_GET_PARTcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoBaseKit.h:420:9`!(this, "nurbsSurfaceGroup", SoGroup );
882 setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).( "faceSet"cxx . . $ SbName#SbName(85c52e162fed56f9)., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! );
883 setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).( "triangleStripSet"cxx . . $ SbName#SbName(85c52e162fed56f9)., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! );
884 setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).( "quadMesh"cxx . . $ SbName#SbName(85c52e162fed56f9)., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! );
885 break;
886 }
887 coords = SO_GET_PARTcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoBaseKit.h:420:9`!( this, "coords", SoCoordinate3 );
888 }
889
890
891 // FORGET IT IF TOO FEW POINTS
892 if ( numRows < 2 || numCols < 2 ) {
893 setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).("faceSet"cxx . . $ SbName#SbName(85c52e162fed56f9)., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!);
894 setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).("triangleStripSet"cxx . . $ SbName#SbName(85c52e162fed56f9)., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! );
895 setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).("quadMesh"cxx . . $ SbName#SbName(85c52e162fed56f9)., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! );
896 setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).("nurbsSurfaceGroup"cxx . . $ SbName#SbName(85c52e162fed56f9)., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! );
897
898 setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).("topCapFaces"cxx . . $ SbName#SbName(85c52e162fed56f9)., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!);
899 setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).("bottomCapFaces"cxx . . $ SbName#SbName(85c52e162fed56f9)., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!);
900
901 if (withSidescxx . . $ GeneralizedCylinder#withSides..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).())
902 coords->pointcxx . . $ SoCoordinate3#point..deleteValuescxx . . $ SoMField#deleteValues(3e454b8ccf442868).( 0, -1 );
903 updateSurroundingManipcxx . . $ GeneralizedCylinder#updateSurroundingManip(49f6e7a06ebc5aa8).();
904 return;
905 }
906
907 // SET UP TOPOLOGICAL INFORMATION
908 int numCoordsTotal;
909 SoMFInt32cxx . . $ SoMFInt32# *nV;
910 if ( withSidescxx . . $ GeneralizedCylinder#withSides..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() ) {
911 switch (sType ) {
912 case QUAD_MESHcxx . . $ GeneralizedCylinder#QUAD_MESH.:
913 // There will be (numRows * numCols) coordinates
914 numCoordsTotal = numRows * numCols;
915 myQMesh->verticesPerColumncxx . . $ SoQuadMesh#verticesPerColumn. =cxx . . $ SoSFInt32#`operator=`(7864480464b09eea). numRows;
916 myQMesh->verticesPerRowcxx . . $ SoQuadMesh#verticesPerRow. =cxx . . $ SoSFInt32#`operator=`(7864480464b09eea). numCols;
917 if (myQMesh->startIndexcxx . . $ SoNonIndexedShape#startIndex..getValuecxx . . $ SoSFInt32#getValue(455f465bc33b4cdf).() != 0)
918 myQMesh->startIndexcxx . . $ SoNonIndexedShape#startIndex. =cxx . . $ SoSFInt32#`operator=`(7864480464b09eea). 0;
919 break;
920 case TRIANGLE_STRIP_SETcxx . . $ GeneralizedCylinder#TRIANGLE_STRIP_SET.:
921 // Each strip (there are numRows-1 in all) has 2*numCols coordinates
922 numCoordsTotal = (numRows - 1) * (numCols * 2);
923
924 nV = &myTStripSet->numVerticescxx . . $ SoTriangleStripSet#numVertices.;
925
926 if (nV->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() != (numRows-1)) {
927 nV->setNumcxx . . $ SoMField#setNum(d4f767463ce0a6b3).(numRows-1);
928 for (int k = 0; k < (numRows-1); k++ )
929 nV->set1Valuecxx . . $ SoMFInt32#set1Value(3e454b8ccf442868).( k, (numCols*2) );
930 }
931 if (myTStripSet->startIndexcxx . . $ SoNonIndexedShape#startIndex..getValuecxx . . $ SoSFInt32#getValue(455f465bc33b4cdf).() != 0)
932 myTStripSet->startIndexcxx . . $ SoNonIndexedShape#startIndex. =cxx . . $ SoSFInt32#`operator=`(7864480464b09eea). 0;
933 break;
934 case FACE_SETcxx . . $ GeneralizedCylinder#FACE_SET.:
935 // Each square is made of 2 tris, drawn with 3 coords.
936 {
937 int numTris = 2 * (numRows - 1) * (numCols - 1);
938 numCoordsTotal = numTris * 3;
939
940 nV = &myFaceSet->numVerticescxx . . $ SoFaceSet#numVertices.;
941 if (nV->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() != numTris) {
942 nV->setNumcxx . . $ SoMField#setNum(d4f767463ce0a6b3).(numTris);
943 for (int k = 0; k < numTris; k++ )
944 nV->set1Valuecxx . . $ SoMFInt32#set1Value(3e454b8ccf442868).( k, 3 );
945 }
946 if (myFaceSet->startIndexcxx . . $ SoNonIndexedShape#startIndex..getValuecxx . . $ SoSFInt32#getValue(455f465bc33b4cdf).() != 0)
947 myFaceSet->startIndexcxx . . $ SoNonIndexedShape#startIndex. =cxx . . $ SoSFInt32#`operator=`(7864480464b09eea). 0;
948 }
949 break;
950 case BEZIER_SURFACEcxx . . $ GeneralizedCylinder#BEZIER_SURFACE.:
951 case CUBIC_SPLINE_SURFACEcxx . . $ GeneralizedCylinder#CUBIC_SPLINE_SURFACE.:
952 case CUBIC_TO_EDGE_SURFACEcxx . . $ GeneralizedCylinder#CUBIC_TO_EDGE_SURFACE.:
953 {
954 // There will be (numRows * numCols) coordinates
955 numCoordsTotal = numRows * numCols;
956
957 // Enlist a NurbMaker to create the surface
958 // patch nodes.
959 if (myNurbMakercxx . . $ GeneralizedCylinder#myNurbMaker. == NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!)
960 myNurbMakercxx . . $ GeneralizedCylinder#myNurbMaker. = new NurbMakercxx . . $ NurbMaker#NurbMaker(49f6e7a06ebc5aa8).;
961 if (sType == BEZIER_SURFACEcxx . . $ GeneralizedCylinder#BEZIER_SURFACE.)
962 myNurbMakercxx . . $ GeneralizedCylinder#myNurbMaker.->setPatchTypecxx . . $ NurbMaker#setPatchType(1d49f8a54f528d5d).( NurbMakercxx . . $ NurbMaker#::BEZIERcxx . . $ NurbMaker#BEZIER. );
963 else if (sType == CUBIC_SPLINE_SURFACEcxx . . $ GeneralizedCylinder#CUBIC_SPLINE_SURFACE.)
964 myNurbMakercxx . . $ GeneralizedCylinder#myNurbMaker.->setPatchTypecxx . . $ NurbMaker#setPatchType(1d49f8a54f528d5d).( NurbMakercxx . . $ NurbMaker#::CUBICcxx . . $ NurbMaker#CUBIC. );
965 else
966 myNurbMakercxx . . $ GeneralizedCylinder#myNurbMaker.->setPatchTypecxx . . $ NurbMaker#setPatchType(1d49f8a54f528d5d).( NurbMakercxx . . $ NurbMaker#::CUBIC_TO_EDGEcxx . . $ NurbMaker#CUBIC_TO_EDGE. );
967 myNurbMakercxx . . $ GeneralizedCylinder#myNurbMaker.->setFlipNormalscxx . . $ NurbMaker#setFlipNormals(d4f767463ce0a6b3).( normsFlippedcxx . . $ GeneralizedCylinder#normsFlipped..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() );
968
969 SbVec2scxx . . $ SbVec2s# closurecxx . . $ SbVec2s#SbVec2s(af780a7c10c7990f).( spineClosedcxx . . $ GeneralizedCylinder#spineClosed..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).(),
970 crossSectionClosedcxx . . $ GeneralizedCylinder#crossSectionClosed..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).());
971 myNurbMakercxx . . $ GeneralizedCylinder#myNurbMaker.->setWraparoundcxx . . $ NurbMaker#setWraparound(edd509d4d7dd9f6).(closure);
972
973 SbVec2scxx . . $ SbVec2s# numMeshDivscxx . . $ SbVec2s#SbVec2s(af780a7c10c7990f).(numCols, numRows);
974
975 SoGroupcxx . . $ SoGroup# *surfGroup;
976 surfGroup = myNurbMakercxx . . $ GeneralizedCylinder#myNurbMaker.->createNurbsGroupcxx . . $ NurbMaker#createNurbsGroup(a643191e15929466).( numMeshDivs, closure );
977 setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).("nurbsSurfaceGroup"cxx . . $ SbName#SbName(85c52e162fed56f9)., surfGroup );
978 }
979 break;
980 }
981
982 if (coords->pointcxx . . $ SoCoordinate3#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() < numCoordsTotal)
983 coords->pointcxx . . $ SoCoordinate3#point..insertSpacecxx . . $ SoMField#insertSpace(3e454b8ccf442868).(0, numCoordsTotal - coords->pointcxx . . $ SoCoordinate3#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).());
984 else if ( coords->pointcxx . . $ SoCoordinate3#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() > numCoordsTotal )
985 coords->pointcxx . . $ SoCoordinate3#point..deleteValuescxx . . $ SoMField#deleteValues(3e454b8ccf442868).(0, coords->pointcxx . . $ SoCoordinate3#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() - numCoordsTotal );
986 }
987
988 int topRow, botRow;
989
990 static SbVec3fcxx . . $ SbVec3f# *topPoints = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!;
991 static SbVec3fcxx . . $ SbVec3f# *botPoints = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!;
992 static SbVec2fcxx . . $ SbVec2f# *topTex = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!;
993 static SbVec2fcxx . . $ SbVec2f# *botTex = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!;
994
995 static int p_alloc = 0;
996 if ( p_alloc != numCols ) {
997 if ( topPoints != NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! ) {
998 delete [] topPoints;
999 topPoints = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!;
1000 }
1001 if ( botPoints != NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! ) {
1002 delete [] botPoints;
1003 botPoints = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!;
1004 }
1005 if ( topTex != NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! ) {
1006 delete [] topTex;
1007 topTex = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!;
1008 }
1009 if ( botTex != NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! ) {
1010 delete [] botTex;
1011 botTex = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!;
1012 }
1013 p_alloc = 0;
1014 }
1015 if ( p_alloc == 0 ) {
1016 p_alloc = numCols;
1017 topPoints = new SbVec3fcxx . . $ SbVec3f#SbVec3f(49f6e7a06ebc5aa8).[p_alloc];
1018 botPoints = new SbVec3fcxx . . $ SbVec3f#SbVec3f(49f6e7a06ebc5aa8).[p_alloc];
1019 topTex = new SbVec2fcxx . . $ SbVec2f#SbVec2f(49f6e7a06ebc5aa8).[p_alloc];
1020 botTex = new SbVec2fcxx . . $ SbVec2f#SbVec2f(49f6e7a06ebc5aa8).[p_alloc];
1021 }
1022
1023
1024 // If either cap is being drawn, and texture is on...
1025 if ( withTextureCoordscxx . . $ GeneralizedCylinder#withTextureCoords..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).()
1026 && ( withTopCapcxx . . $ GeneralizedCylinder#withTopCap..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() || withBottomCapcxx . . $ GeneralizedCylinder#withBottomCap..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() )
1027 && crossSectionClosedcxx . . $ GeneralizedCylinder#crossSectionClosed..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() && numCols >= 4 ) {
1028 loadTextureRowcxx . . $ GeneralizedCylinder#loadTextureRow(f805f18faa37eb4b).( -1, topTex );
1029 SoTextureCoordinate2cxx . . $ SoTextureCoordinate2# *cTC
1030 = SO_GET_PARTcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoBaseKit.h:420:9`!( this, "capTextureCoords", SoTextureCoordinate2 );
1031 cTC->pointcxx . . $ SoTextureCoordinate2#point..setValuescxx . . $ SoMFVec2f#setValues(21d0784f834d9cf3).( 0, numCols, topTex );
1032 }
1033 else {
1034 setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).("capTextureCoords"cxx . . $ SbName#SbName(85c52e162fed56f9)., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!);
1035 }
1036
1037 SoCoordinate3cxx . . $ SoCoordinate3# *topCapC = SO_GET_PARTcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoBaseKit.h:420:9`!(this,"topCapCoords",SoCoordinate3);
1038 SoIndexedFaceSetcxx . . $ SoIndexedFaceSet# *topCapF = SO_GET_PARTcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoBaseKit.h:420:9`!(this,"topCapFaces", SoIndexedFaceSet);
1039 SoCoordinate3cxx . . $ SoCoordinate3# *botCapC = SO_GET_PARTcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoBaseKit.h:420:9`!(this,"bottomCapCoords",SoCoordinate3);
1040 SoIndexedFaceSetcxx . . $ SoIndexedFaceSet# *botCapF =SO_GET_PARTcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoBaseKit.h:420:9`!(this,"bottomCapFaces", SoIndexedFaceSet);
1041
1042 if ( withTopCapcxx . . $ GeneralizedCylinder#withTopCap..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() && crossSectionClosedcxx . . $ GeneralizedCylinder#crossSectionClosed..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).()
1043 && numCols >= 4 ) {
1044
1045
1046 SoMFVec3fcxx . . $ SoMFVec3f# *topC = &topCapC->pointcxx . . $ SoCoordinate3#point.;
1047 SoMFInt32cxx . . $ SoMFInt32# *topF = &topCapF->coordIndexcxx . . $ SoIndexedShape#coordIndex.;
1048 SoMFInt32cxx . . $ SoMFInt32# *topS = &topCapScratchFacecxx . . $ GeneralizedCylinder#topCapScratchFace.->coordIndexcxx . . $ SoIndexedShape#coordIndex.;
1049
1050 // Load the values of the section points into topCapC.
1051 // Leave out the last point, since it is a repeat of the first
1052 // (remember, crossSectionClosed == TRUE !)
1053 if ( numCols - 1 < topC->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() )
1054 topC->deleteValuescxx . . $ SoMField#deleteValues(3e454b8ccf442868).( 0, topC->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() - (numCols - 1) );
1055 topC->setValuescxx . . $ SoMFVec3f#setValues(5f546bd7717b455b).( 0, numCols - 1, cross->getValuescxx . . $ SoMFVec3f#getValues(aa6f7bb3bba6ed95).(0) );
1056
1057 // The triangulator likes the y values to be 0.0. So flatten the
1058 // sucker out.
1059 SbVec3fcxx . . $ SbVec3f# *bunchaTopVecs = topC->startEditingcxx . . $ SoMFVec3f#startEditing(d7218d170b8c46e1).();
1060 SbBoolcxx . . $ SbBool# topVecsChanged = FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`!;
1061 for (int topCount = 0; topCount < topC->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).(); topCount++ ) {
1062 SbVec3fcxx . . $ SbVec3f# theVec = (*topC)[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).topCount];
1063 if (bunchaTopVecs[topCount][cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).1] != 0.0) {
1064 bunchaTopVecs[topCount][cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).1] = 0.0;
1065 topVecsChanged = TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!;
1066 }
1067 }
1068 bunchaTopVecs = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!;
1069 if (topVecsChanged)
1070 topC->finishEditingcxx . . $ SoMFVec3f#finishEditing(49f6e7a06ebc5aa8).();
1071
1072 // Load the indices to draw the section as a single polygon into
1073 // topCapScratchFace
1074 if ( (topC->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() + 1) < topS->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() )
1075 topS->deleteValuescxx . . $ SoMField#deleteValues(3e454b8ccf442868).( 0, topS->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() - (topC->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() + 1) );
1076 else if ( (topC->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() + 1) > topS->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() )
1077 topS->insertSpacecxx . . $ SoMField#insertSpace(3e454b8ccf442868).( 0, (topC->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() + 1) - topS->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() );
1078 int32_t *scratchVals = topS->startEditingcxx . . $ SoMFInt32#startEditing(a7741f82f5fc3640).();
1079 for ( int i = 0; i < topC->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).(); i++ ) {
1080 scratchVals[i] = i;
1081 }
1082 scratchVals[ topC->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() ] = -1; // to close the polygon
1083 topS->finishEditingcxx . . $ SoMFInt32#finishEditing(49f6e7a06ebc5aa8).();
1084
1085 // Before calling loadRow (i.e., while the points still lay in the
1086 // y=0 plane), and before triangulating (i.e., while we still have
1087 // a record of a polygon which follows the entire cross section)
1088 // determine if the cross section is clockwise ordered. This will
1089 // affect the normal vector we select.
1090 SbBoolcxx . . $ SbBool# isSectionClockWise;
1091 isSectionClockWise = Triangulatorcxx . . $ Triangulator#::clockWiseTestcxx . . $ Triangulator#clockWiseTest(1fd5b3a20eb236d8).(
1092 (*topC), (*topS), 0, topC->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).());
1093
1094 // Triangulate, putting result into topCapF
1095 Triangulatorcxx . . $ Triangulator#::triangulatecxx . . $ Triangulator#triangulate(ce629b07d8fc162b).( *topC, *topS, *topF );
1096
1097 // Triangulation makes everything clockwise ordered.
1098 // Assure that normals are in the right direction...
1099 if ( normsFlippedcxx . . $ GeneralizedCylinder#normsFlipped..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() != isSectionClockWise ) {
1100 // reverse the order of the points in topF.
1101 // Each polygon in topF should be a triangle at this point,
1102 // so reversing the order is simple.
1103 int32_t *vals = topF->startEditingcxx . . $ SoMFInt32#startEditing(a7741f82f5fc3640).();
1104 int32_t swapTemp;
1105 for ( int ind = 0; ind < topF->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).(); ind += 4 ) {
1106 // Switch ind and ind+2 (ind+3 is a -1 to signal end of poly)
1107 swapTemp = vals[ind];
1108 vals[ind] = vals[ind+2];
1109 vals[ind+2] = swapTemp;
1110 }
1111 topF->finishEditingcxx . . $ SoMFInt32#finishEditing(49f6e7a06ebc5aa8).();
1112 }
1113
1114 // Check that, after triangulation, there are still polygons left...
1115 if ( topF->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() > 0 ) {
1116
1117 // Transform the values for the points in the section as they
1118 // appear in the final row
1119 topC->insertSpacecxx . . $ SoMField#insertSpace(3e454b8ccf442868).( 0, 1 ); // Add room for an extra point at the
1120 // end since loadRow will put it there...
1121 SbVec3fcxx . . $ SbVec3f# *topCapPoints = topC->startEditingcxx . . $ SoMFVec3f#startEditing(d7218d170b8c46e1).();
1122 loadRowcxx . . $ GeneralizedCylinder#loadRow(b091e37b266ef0ff).( 0, topCapPoints );
1123 topC->finishEditingcxx . . $ SoMFVec3f#finishEditing(49f6e7a06ebc5aa8).();
1124 }
1125 }
1126 else {
1127 // Clear out the coord and face set for top cap
1128 topCapC->pointcxx . . $ SoCoordinate3#point..deleteValuescxx . . $ SoMField#deleteValues(3e454b8ccf442868).( 0, -1 );
1129 topCapF->coordIndexcxx . . $ SoIndexedShape#coordIndex..deleteValuescxx . . $ SoMField#deleteValues(3e454b8ccf442868).( 0, -1 );
1130 }
1131
1132 if ( withBottomCapcxx . . $ GeneralizedCylinder#withBottomCap..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() && crossSectionClosedcxx . . $ GeneralizedCylinder#crossSectionClosed..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).()
1133 && numCols >= 4 ) {
1134
1135 SoMFVec3fcxx . . $ SoMFVec3f# *botC = &botCapC->pointcxx . . $ SoCoordinate3#point.;
1136 SoMFInt32cxx . . $ SoMFInt32# *botF = &botCapF->coordIndexcxx . . $ SoIndexedShape#coordIndex.;
1137 SoMFInt32cxx . . $ SoMFInt32# *botS = &bottomCapScratchFacecxx . . $ GeneralizedCylinder#bottomCapScratchFace.->coordIndexcxx . . $ SoIndexedShape#coordIndex.;
1138
1139 // Load the values of the section points into botCapC.
1140 // Leave out the last point, since it is a repeat of the first
1141 // (remember, crossSectionClosed == TRUE !)
1142 if ( numCols - 1 < botC->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() )
1143 botC->deleteValuescxx . . $ SoMField#deleteValues(3e454b8ccf442868).( 0, botC->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() - (numCols - 1) );
1144 botC->setValuescxx . . $ SoMFVec3f#setValues(5f546bd7717b455b).( 0, numCols - 1, cross->getValuescxx . . $ SoMFVec3f#getValues(aa6f7bb3bba6ed95).(0) );
1145
1146 // The triangulator likes the y values to be 0.0. So flatten the
1147 // sucker out.
1148 SbVec3fcxx . . $ SbVec3f# *bunchaBotVecs = botC->startEditingcxx . . $ SoMFVec3f#startEditing(d7218d170b8c46e1).();
1149 SbBoolcxx . . $ SbBool# botVecsChanged = FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`!;
1150 for (int botCount = 0; botCount < botC->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).(); botCount++ ) {
1151 SbVec3fcxx . . $ SbVec3f# theVec = (*botC)[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).botCount];
1152 if (bunchaBotVecs[botCount][cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).1] != 0.0) {
1153 bunchaBotVecs[botCount][cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).1] = 0.0;
1154 botVecsChanged = TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!;
1155 }
1156 }
1157 bunchaBotVecs = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!;
1158 if (botVecsChanged)
1159 botC->finishEditingcxx . . $ SoMFVec3f#finishEditing(49f6e7a06ebc5aa8).();
1160
1161 // Load the indices to draw the section as a single polygon into
1162 // bottomCapScratchFace
1163 if ( (botC->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() + 1) < botS->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() )
1164 botS->deleteValuescxx . . $ SoMField#deleteValues(3e454b8ccf442868).( 0, botS->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() - (botC->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() + 1) );
1165 else if ( (botC->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() + 1) > botS->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() )
1166 botS->insertSpacecxx . . $ SoMField#insertSpace(3e454b8ccf442868).( 0, (botC->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() + 1) - botS->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() );
1167 int32_t *scratchVals = botS->startEditingcxx . . $ SoMFInt32#startEditing(a7741f82f5fc3640).();
1168 for ( int i = 0; i < botC->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).(); i++ ) {
1169 scratchVals[i] = i;
1170 }
1171 scratchVals[ botC->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() ] = -1; // to close the polygon
1172 botS->finishEditingcxx . . $ SoMFInt32#finishEditing(49f6e7a06ebc5aa8).();
1173
1174 // Before calling loadRow (i.e., while the points still lay in the
1175 // y=0 plane), and before triangulating (i.e., while we still have
1176 // a record of a polygon which follows the entire cross section)
1177 // determine if the cross section is clockwise ordered. This will
1178 // affect the normal vector we select.
1179 SbBoolcxx . . $ SbBool# isSectionClockWise;
1180 isSectionClockWise = Triangulatorcxx . . $ Triangulator#::clockWiseTestcxx . . $ Triangulator#clockWiseTest(1fd5b3a20eb236d8).(
1181 (*botC), (*botS), 0, botC->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).());
1182
1183 // Triangulate, putting result into bottomCapFaces
1184 Triangulatorcxx . . $ Triangulator#::triangulatecxx . . $ Triangulator#triangulate(ce629b07d8fc162b).( *botC, *botS, *botF );
1185
1186 // Triangulation makes everything clockwise ordered.
1187 // Assure that normals are in the right direction...
1188 if ( normsFlippedcxx . . $ GeneralizedCylinder#normsFlipped..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() == isSectionClockWise ) {
1189 // reverse the order of the points in botF.
1190 // Each polygon in topF should be a triangle at this point,
1191 // so reversing the order is simple.
1192 int32_t *vals = botF->startEditingcxx . . $ SoMFInt32#startEditing(a7741f82f5fc3640).();
1193 int32_t swapTemp;
1194 for ( int ind = 0; ind < botF->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).(); ind += 4 ) {
1195 // Switch ind and ind+2 (ind+3 is a -1 to signal end of poly)
1196 swapTemp = vals[ind];
1197 vals[ind] = vals[ind+2];
1198 vals[ind+2] = swapTemp;
1199 }
1200 botF->finishEditingcxx . . $ SoMFInt32#finishEditing(49f6e7a06ebc5aa8).();
1201 }
1202
1203 // Check that, after triangulation, there are still polygons left...
1204 if ( botF->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() > 0 ) {
1205
1206 // Transform the values for the points in the section as they
1207 // appear in the final row
1208 botC->insertSpacecxx . . $ SoMField#insertSpace(3e454b8ccf442868).( 0, 1 ); // Add room for an extra point at the
1209 // end, since loadRow will put it there.
1210 SbVec3fcxx . . $ SbVec3f# *bottomCapPoints = botC->startEditingcxx . . $ SoMFVec3f#startEditing(d7218d170b8c46e1).();
1211 loadRowcxx . . $ GeneralizedCylinder#loadRow(b091e37b266ef0ff).( numRows - 1, bottomCapPoints );
1212 botC->finishEditingcxx . . $ SoMFVec3f#finishEditing(49f6e7a06ebc5aa8).();
1213 }
1214 }
1215
1216 else {
1217 // Clear out the coord and face set for bottom cap
1218 botCapC->pointcxx . . $ SoCoordinate3#point..deleteValuescxx . . $ SoMField#deleteValues(3e454b8ccf442868).( 0, -1 );
1219 botCapF->coordIndexcxx . . $ SoIndexedShape#coordIndex..deleteValuescxx . . $ SoMField#deleteValues(3e454b8ccf442868).( 0, -1 );
1220 }
1221
1222
1223
1224 if ( withSidescxx . . $ GeneralizedCylinder#withSides..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() ) {
1225
1226 SbVec2fcxx . . $ SbVec2f# *tCEdit;
1227 SoTextureCoordinate2cxx . . $ SoTextureCoordinate2# *tCN;
1228 if ( withTextureCoordscxx . . $ GeneralizedCylinder#withTextureCoords..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() ) {
1229 tCN = SO_GET_PARTcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoBaseKit.h:420:9`!(this, "textureCoords", SoTextureCoordinate2 );
1230 if (tCN->pointcxx . . $ SoTextureCoordinate2#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() < numCoordsTotal)
1231 tCN->pointcxx . . $ SoTextureCoordinate2#point..insertSpacecxx . . $ SoMField#insertSpace(3e454b8ccf442868).(0, numCoordsTotal - tCN->pointcxx . . $ SoTextureCoordinate2#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).());
1232 else if ( tCN->pointcxx . . $ SoTextureCoordinate2#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() > numCoordsTotal )
1233 tCN->pointcxx . . $ SoTextureCoordinate2#point..deleteValuescxx . . $ SoMField#deleteValues(3e454b8ccf442868).(0, tCN->pointcxx . . $ SoTextureCoordinate2#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() - numCoordsTotal );
1234 tCEdit = tCN->pointcxx . . $ SoTextureCoordinate2#point..startEditingcxx . . $ SoMFVec2f#startEditing(8881486cd4924579).();
1235 }
1236 else {
1237 setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).("textureCoords"cxx . . $ SbName#SbName(85c52e162fed56f9)., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!);
1238 }
1239
1240 SbVec3fcxx . . $ SbVec3f# *coordsEdit = coords->pointcxx . . $ SoCoordinate3#point..startEditingcxx . . $ SoMFVec3f#startEditing(d7218d170b8c46e1).();
1241 int curCoord = 0;
1242 int curTexCoord = 0;
1243
1244 for (topRow = 0, botRow = 1; topRow < numRows - 1; topRow++ , botRow++ ){
1245 if ( topRow == 0 ) {
1246 // calculate topRow
1247 loadRowcxx . . $ GeneralizedCylinder#loadRow(b091e37b266ef0ff).( topRow, topPoints );
1248 if ( withTextureCoordscxx . . $ GeneralizedCylinder#withTextureCoords..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() )
1249 loadTextureRowcxx . . $ GeneralizedCylinder#loadTextureRow(f805f18faa37eb4b).( topRow, topTex );
1250 }
1251 else {
1252 // switch rows, so old botRow becomes new topRow
1253 SbVec3fcxx . . $ SbVec3f# *temp = topPoints;
1254 topPoints = botPoints;
1255 botPoints = temp;
1256 if ( withTextureCoordscxx . . $ GeneralizedCylinder#withTextureCoords..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() ) {
1257 SbVec2fcxx . . $ SbVec2f# *temp2 = topTex;
1258 topTex = botTex;
1259 botTex = temp2;
1260 }
1261 }
1262
1263 // calculate botRow
1264 loadRowcxx . . $ GeneralizedCylinder#loadRow(b091e37b266ef0ff).( botRow, botPoints );
1265 if ( withTextureCoordscxx . . $ GeneralizedCylinder#withTextureCoords..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() )
1266 loadTextureRowcxx . . $ GeneralizedCylinder#loadTextureRow(f805f18faa37eb4b).( botRow, botTex );
1267
1268
1269 // put the coordinates for this row triangles into the node...
1270 SbBoolcxx . . $ SbBool# flipped = normsFlippedcxx . . $ GeneralizedCylinder#normsFlipped..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).();
1271
1272 switch(sType) {
1273 case QUAD_MESHcxx . . $ GeneralizedCylinder#QUAD_MESH.:
1274 case BEZIER_SURFACEcxx . . $ GeneralizedCylinder#BEZIER_SURFACE.:
1275 case CUBIC_SPLINE_SURFACEcxx . . $ GeneralizedCylinder#CUBIC_SPLINE_SURFACE.:
1276 case CUBIC_TO_EDGE_SURFACEcxx . . $ GeneralizedCylinder#CUBIC_TO_EDGE_SURFACE.:
1277 // For these two, load only coords for the bottom row.
1278 // However load the top row also the first time through
1279 {
1280 int curCol;
1281 if (topRow == 0) {
1282 if ( flipped )
1283 for (curCol = 0; curCol < numCols; curCol++ )
1284 coordsEdit[curCoord++] =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). topPoints[curCol];
1285 else
1286 for (curCol = numCols-1; curCol >= 0; curCol-- )
1287 coordsEdit[curCoord++] =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). topPoints[curCol];
1288 }
1289
1290 // load bottom row
1291 if ( flipped )
1292 for (curCol = 0; curCol < numCols; curCol++ )
1293 coordsEdit[curCoord++] =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). botPoints[curCol];
1294 else
1295 for (curCol = numCols-1; curCol >= 0; curCol-- )
1296 coordsEdit[curCoord++] =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). botPoints[curCol];
1297 }
1298 break;
1299 case TRIANGLE_STRIP_SETcxx . . $ GeneralizedCylinder#TRIANGLE_STRIP_SET.:
1300 {
1301 for( int curCol = 0; curCol < numCols; curCol++ ) {
1302 if ( ! flipped ) {
1303 coordsEdit[curCoord++] =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). topPoints[curCol];
1304 coordsEdit[curCoord++] =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). botPoints[curCol];
1305 }
1306 else {
1307 coordsEdit[curCoord++] =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). botPoints[curCol];
1308 coordsEdit[curCoord++] =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). topPoints[curCol];
1309 }
1310 }
1311 }
1312 break;
1313 case FACE_SETcxx . . $ GeneralizedCylinder#FACE_SET.:
1314 int leftCol, rightCol;
1315 for ( leftCol = 0, rightCol = 1; leftCol < numCols - 1;
1316 leftCol++, rightCol++ ) {
1317
1318 if ( ! flipped ) {
1319 // first draw the top left triangle
1320 coordsEdit[curCoord++] =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). topPoints[leftCol];
1321 coordsEdit[curCoord++] =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). topPoints[rightCol];
1322 coordsEdit[curCoord++] =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). botPoints[leftCol];
1323
1324 // then draw the bottom right triangle
1325 coordsEdit[curCoord++] =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). botPoints[leftCol];
1326 coordsEdit[curCoord++] =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). topPoints[rightCol];
1327 coordsEdit[curCoord++] =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). botPoints[rightCol];
1328 }
1329 else {
1330 // first draw the top left triangle
1331 coordsEdit[curCoord++] =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). botPoints[leftCol];
1332 coordsEdit[curCoord++] =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). topPoints[rightCol];
1333 coordsEdit[curCoord++] =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). topPoints[leftCol];
1334
1335 // then draw the bottom right triangle
1336 coordsEdit[curCoord++] =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). botPoints[rightCol];
1337 coordsEdit[curCoord++] =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). topPoints[rightCol];
1338 coordsEdit[curCoord++] =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). botPoints[leftCol];
1339 }
1340 }
1341 break;
1342 }
1343
1344 if ( withTextureCoordscxx . . $ GeneralizedCylinder#withTextureCoords..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() ) {
1345 switch(sType) {
1346 case QUAD_MESHcxx . . $ GeneralizedCylinder#QUAD_MESH.:
1347 case BEZIER_SURFACEcxx . . $ GeneralizedCylinder#BEZIER_SURFACE.:
1348 case CUBIC_SPLINE_SURFACEcxx . . $ GeneralizedCylinder#CUBIC_SPLINE_SURFACE.:
1349 case CUBIC_TO_EDGE_SURFACEcxx . . $ GeneralizedCylinder#CUBIC_TO_EDGE_SURFACE.:
1350 // For these two, load only coords for the bottom row.
1351 // However load the top row also the first time through
1352 {
1353 int curCol;
1354 if (topRow == 0) {
1355 if ( flipped )
1356 for (curCol = 0; curCol < numCols; curCol++ )
1357 tCEdit[curTexCoord++] =cxx . . $ SbVec2f#`operator=`(55af37c201462dc0). topTex[curCol];
1358 else
1359 for (curCol = numCols-1; curCol >= 0; curCol-- )
1360 tCEdit[curTexCoord++] =cxx . . $ SbVec2f#`operator=`(55af37c201462dc0). topTex[curCol];
1361 }
1362
1363 // load bottom row
1364 if ( flipped )
1365 for (curCol = 0; curCol < numCols; curCol++ )
1366 tCEdit[curTexCoord++] =cxx . . $ SbVec2f#`operator=`(55af37c201462dc0). botTex[curCol];
1367 else
1368 for (curCol = numCols-1; curCol >= 0; curCol-- )
1369 tCEdit[curTexCoord++] =cxx . . $ SbVec2f#`operator=`(55af37c201462dc0). botTex[curCol];
1370 }
1371 break;
1372 case TRIANGLE_STRIP_SETcxx . . $ GeneralizedCylinder#TRIANGLE_STRIP_SET.:
1373 {
1374 for (int curCol=0; curCol < numCols;curCol++){
1375 if ( ! flipped ) {
1376 tCEdit[ curTexCoord++] =cxx . . $ SbVec2f#`operator=`(55af37c201462dc0). topTex[curCol];
1377 tCEdit[ curTexCoord++] =cxx . . $ SbVec2f#`operator=`(55af37c201462dc0). botTex[curCol];
1378 }
1379 else {
1380 tCEdit[ curTexCoord++] =cxx . . $ SbVec2f#`operator=`(55af37c201462dc0). botTex[curCol];
1381 tCEdit[ curTexCoord++] =cxx . . $ SbVec2f#`operator=`(55af37c201462dc0). topTex[curCol];
1382 }
1383 }
1384 }
1385 break;
1386 case FACE_SETcxx . . $ GeneralizedCylinder#FACE_SET.:
1387 int leftCol, rightCol;
1388
1389 // set the texture coordinates for these triangles...
1390 for ( leftCol = 0, rightCol = 1; leftCol < numCols - 1;
1391 leftCol++, rightCol++ ) {
1392
1393 if ( ! flipped ) {
1394 // first draw the top left triangle
1395 tCEdit[ curTexCoord++] =cxx . . $ SbVec2f#`operator=`(55af37c201462dc0). topTex[leftCol];
1396 tCEdit[ curTexCoord++] =cxx . . $ SbVec2f#`operator=`(55af37c201462dc0). topTex[rightCol];
1397 tCEdit[ curTexCoord++] =cxx . . $ SbVec2f#`operator=`(55af37c201462dc0). botTex[leftCol];
1398
1399 // then draw the bottom right triangle
1400 tCEdit[ curTexCoord++] =cxx . . $ SbVec2f#`operator=`(55af37c201462dc0). botTex[leftCol];
1401 tCEdit[ curTexCoord++] =cxx . . $ SbVec2f#`operator=`(55af37c201462dc0). topTex[rightCol];
1402 tCEdit[ curTexCoord++] =cxx . . $ SbVec2f#`operator=`(55af37c201462dc0). botTex[rightCol];
1403 }
1404 else {
1405 // first draw the top left triangle
1406 tCEdit[ curTexCoord++] =cxx . . $ SbVec2f#`operator=`(55af37c201462dc0). botTex[leftCol];
1407 tCEdit[ curTexCoord++] =cxx . . $ SbVec2f#`operator=`(55af37c201462dc0). topTex[rightCol];
1408 tCEdit[ curTexCoord++] =cxx . . $ SbVec2f#`operator=`(55af37c201462dc0). topTex[leftCol];
1409
1410 // then draw the bottom right triangle
1411 tCEdit[ curTexCoord++] =cxx . . $ SbVec2f#`operator=`(55af37c201462dc0). botTex[rightCol];
1412 tCEdit[ curTexCoord++] =cxx . . $ SbVec2f#`operator=`(55af37c201462dc0). topTex[rightCol];
1413 tCEdit[ curTexCoord++] =cxx . . $ SbVec2f#`operator=`(55af37c201462dc0). botTex[leftCol];
1414 }
1415 }
1416 break;
1417 }
1418 }
1419 }
1420 coords->pointcxx . . $ SoCoordinate3#point..finishEditingcxx . . $ SoMFVec3f#finishEditing(49f6e7a06ebc5aa8).();
1421 if ( withTextureCoordscxx . . $ GeneralizedCylinder#withTextureCoords..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() ) {
1422 tCN->pointcxx . . $ SoTextureCoordinate2#point..finishEditingcxx . . $ SoMFVec2f#finishEditing(49f6e7a06ebc5aa8).();
1423 }
1424 }
1425
1426 // If there's a manip as our transform, tell it to change size.
1427 updateSurroundingManipcxx . . $ GeneralizedCylinder#updateSurroundingManip(49f6e7a06ebc5aa8).();
1428 }
1429
1430 SoSeparatorcxx . . $ SoSeparator# *
1431 GeneralizedCylindercxx . . $ GeneralizedCylinder#::makeVanillaVersioncxx . . $ GeneralizedCylinder#makeVanillaVersion(144169e46c9b0e8a).()
1432 {
1433 // Start with a nice update!
1434 updateSurfacecxx . . $ GeneralizedCylinder#updateSurface(49f6e7a06ebc5aa8).();
1435
1436 SoSeparatorcxx . . $ SoSeparator# *answer = new SoSeparatorcxx . . $ SoSeparator#SoSeparator(49f6e7a06ebc5aa8).;
1437 answer->refcxx . . $ SoBase#ref(83f5f38750778ac8).();
1438
1439 SoNodecxx . . $ SoNode# *newKid;
1440
1441 int numCols = fullCrossSectioncxx . . $ GeneralizedCylinder#fullCrossSection.->pointcxx . . $ SoCoordinate3#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).();
1442
1443 // Go through all the relevant parts. If you find them, add them as
1444 // a child to the answer.
1445
1446 if ( newKid = getPartcxx . . $ SoBaseKit#getPart(795225bb0fb495d5).( "callbackList"cxx . . $ SbName#SbName(85c52e162fed56f9)., FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! ))
1447 answer->addChildcxx . . $ SoGroup#addChild(da6c7544ccee32bd).( newKid );
1448 if ( newKid = getPartcxx . . $ SoBaseKit#getPart(795225bb0fb495d5).( "pickStyle"cxx . . $ SbName#SbName(85c52e162fed56f9)., FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! ))
1449 answer->addChildcxx . . $ SoGroup#addChild(da6c7544ccee32bd).( newKid );
1450
1451 if ( newKid = getPartcxx . . $ SoBaseKit#getPart(795225bb0fb495d5).( "appearance.lightModel"cxx . . $ SbName#SbName(85c52e162fed56f9)., FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! ))
1452 answer->addChildcxx . . $ SoGroup#addChild(da6c7544ccee32bd).( newKid );
1453 if ( newKid = getPartcxx . . $ SoBaseKit#getPart(795225bb0fb495d5).( "appearance.environment"cxx . . $ SbName#SbName(85c52e162fed56f9)., FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! ))
1454 answer->addChildcxx . . $ SoGroup#addChild(da6c7544ccee32bd).( newKid );
1455 if ( newKid = getPartcxx . . $ SoBaseKit#getPart(795225bb0fb495d5).( "appearance.drawStyle"cxx . . $ SbName#SbName(85c52e162fed56f9)., FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! ))
1456 answer->addChildcxx . . $ SoGroup#addChild(da6c7544ccee32bd).( newKid );
1457 if ( newKid = getPartcxx . . $ SoBaseKit#getPart(795225bb0fb495d5).( "appearance.material"cxx . . $ SbName#SbName(85c52e162fed56f9)., FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! ))
1458 answer->addChildcxx . . $ SoGroup#addChild(da6c7544ccee32bd).( newKid );
1459 if ( newKid = getPartcxx . . $ SoBaseKit#getPart(795225bb0fb495d5).( "appearance.complexity"cxx . . $ SbName#SbName(85c52e162fed56f9)., FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! ))
1460 answer->addChildcxx . . $ SoGroup#addChild(da6c7544ccee32bd).( newKid );
1461 if ( withTextureCoordscxx . . $ GeneralizedCylinder#withTextureCoords..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() ) {
1462 if ( newKid = getPartcxx . . $ SoBaseKit#getPart(795225bb0fb495d5).( "appearance.texture2"cxx . . $ SbName#SbName(85c52e162fed56f9)., FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! ))
1463 answer->addChildcxx . . $ SoGroup#addChild(da6c7544ccee32bd).( newKid );
1464 }
1465 if ( newKid = getPartcxx . . $ SoBaseKit#getPart(795225bb0fb495d5).( "appearance.font"cxx . . $ SbName#SbName(85c52e162fed56f9)., FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! ))
1466 answer->addChildcxx . . $ SoGroup#addChild(da6c7544ccee32bd).( newKid );
1467
1468 if ( newKid = getPartcxx . . $ SoBaseKit#getPart(795225bb0fb495d5).( "units"cxx . . $ SbName#SbName(85c52e162fed56f9)., FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! ))
1469 answer->addChildcxx . . $ SoGroup#addChild(da6c7544ccee32bd).( newKid );
1470 if ( newKid = getPartcxx . . $ SoBaseKit#getPart(795225bb0fb495d5).( "transform"cxx . . $ SbName#SbName(85c52e162fed56f9)., FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! ))
1471 answer->addChildcxx . . $ SoGroup#addChild(da6c7544ccee32bd).( newKid );
1472 if ( withTextureCoordscxx . . $ GeneralizedCylinder#withTextureCoords..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() ) {
1473 if ( newKid = getPartcxx . . $ SoBaseKit#getPart(795225bb0fb495d5).( "texture2Transform"cxx . . $ SbName#SbName(85c52e162fed56f9)., FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! ))
1474 answer->addChildcxx . . $ SoGroup#addChild(da6c7544ccee32bd).( newKid );
1475 }
1476
1477 if ( newKid = getPartcxx . . $ SoBaseKit#getPart(795225bb0fb495d5).( "shapeHints"cxx . . $ SbName#SbName(85c52e162fed56f9)., FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! ))
1478 answer->addChildcxx . . $ SoGroup#addChild(da6c7544ccee32bd).( newKid );
1479 if ( withTextureCoordscxx . . $ GeneralizedCylinder#withTextureCoords..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() ) {
1480 if ( newKid = getPartcxx . . $ SoBaseKit#getPart(795225bb0fb495d5).( "textureBinding"cxx . . $ SbName#SbName(85c52e162fed56f9)., FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! ))
1481 answer->addChildcxx . . $ SoGroup#addChild(da6c7544ccee32bd).( newKid );
1482 if ( newKid = getPartcxx . . $ SoBaseKit#getPart(795225bb0fb495d5).( "textureCoords"cxx . . $ SbName#SbName(85c52e162fed56f9)., FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! ))
1483 answer->addChildcxx . . $ SoGroup#addChild(da6c7544ccee32bd).( newKid );
1484 if ( newKid = getPartcxx . . $ SoBaseKit#getPart(795225bb0fb495d5).( "texture2"cxx . . $ SbName#SbName(85c52e162fed56f9)., FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! ))
1485 answer->addChildcxx . . $ SoGroup#addChild(da6c7544ccee32bd).( newKid );
1486 }
1487 if ( newKid = getPartcxx . . $ SoBaseKit#getPart(795225bb0fb495d5).( "coords"cxx . . $ SbName#SbName(85c52e162fed56f9)., FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! ))
1488 answer->addChildcxx . . $ SoGroup#addChild(da6c7544ccee32bd).( newKid );
1489 if ( newKid = getPartcxx . . $ SoBaseKit#getPart(795225bb0fb495d5).( "faceSet"cxx . . $ SbName#SbName(85c52e162fed56f9)., FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! ))
1490 answer->addChildcxx . . $ SoGroup#addChild(da6c7544ccee32bd).( newKid );
1491 if ( newKid = getPartcxx . . $ SoBaseKit#getPart(795225bb0fb495d5).( "quadMesh"cxx . . $ SbName#SbName(85c52e162fed56f9)., FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! ))
1492 answer->addChildcxx . . $ SoGroup#addChild(da6c7544ccee32bd).( newKid );
1493 if ( newKid = getPartcxx . . $ SoBaseKit#getPart(795225bb0fb495d5).( "nurbsSurfaceGroup"cxx . . $ SbName#SbName(85c52e162fed56f9)., FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! ))
1494 answer->addChildcxx . . $ SoGroup#addChild(da6c7544ccee32bd).( newKid );
1495 if ( newKid = getPartcxx . . $ SoBaseKit#getPart(795225bb0fb495d5).( "triangleStripSet"cxx . . $ SbName#SbName(85c52e162fed56f9)., FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! ))
1496 answer->addChildcxx . . $ SoGroup#addChild(da6c7544ccee32bd).( newKid );
1497
1498 if ( withTextureCoordscxx . . $ GeneralizedCylinder#withTextureCoords..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).()
1499 && ( withTopCapcxx . . $ GeneralizedCylinder#withTopCap..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() || withBottomCapcxx . . $ GeneralizedCylinder#withBottomCap..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() )
1500 && crossSectionClosedcxx . . $ GeneralizedCylinder#crossSectionClosed..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() && numCols >= 4 ) {
1501 if ( newKid = getPartcxx . . $ SoBaseKit#getPart(795225bb0fb495d5).( "capTextureBinding"cxx . . $ SbName#SbName(85c52e162fed56f9)., FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! ))
1502 answer->addChildcxx . . $ SoGroup#addChild(da6c7544ccee32bd).( newKid );
1503 if ( newKid = getPartcxx . . $ SoBaseKit#getPart(795225bb0fb495d5).( "capTextureCoords"cxx . . $ SbName#SbName(85c52e162fed56f9)., FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! ))
1504 answer->addChildcxx . . $ SoGroup#addChild(da6c7544ccee32bd).( newKid );
1505 }
1506
1507 if ( withTopCapcxx . . $ GeneralizedCylinder#withTopCap..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).()
1508 && crossSectionClosedcxx . . $ GeneralizedCylinder#crossSectionClosed..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() && numCols >= 4 ) {
1509 if ( newKid = getPartcxx . . $ SoBaseKit#getPart(795225bb0fb495d5).( "topCapCoords"cxx . . $ SbName#SbName(85c52e162fed56f9)., FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! ))
1510 answer->addChildcxx . . $ SoGroup#addChild(da6c7544ccee32bd).( newKid );
1511 if ( newKid = getPartcxx . . $ SoBaseKit#getPart(795225bb0fb495d5).( "topCapFaces"cxx . . $ SbName#SbName(85c52e162fed56f9)., FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! ))
1512 answer->addChildcxx . . $ SoGroup#addChild(da6c7544ccee32bd).( newKid );
1513 }
1514
1515 if ( withBottomCapcxx . . $ GeneralizedCylinder#withBottomCap..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).()
1516 && crossSectionClosedcxx . . $ GeneralizedCylinder#crossSectionClosed..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() && numCols >= 4 ) {
1517 if ( newKid = getPartcxx . . $ SoBaseKit#getPart(795225bb0fb495d5).( "bottomCapCoords"cxx . . $ SbName#SbName(85c52e162fed56f9)., FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! ))
1518 answer->addChildcxx . . $ SoGroup#addChild(da6c7544ccee32bd).( newKid );
1519 if ( newKid = getPartcxx . . $ SoBaseKit#getPart(795225bb0fb495d5).( "bottomCapFaces"cxx . . $ SbName#SbName(85c52e162fed56f9)., FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! ))
1520 answer->addChildcxx . . $ SoGroup#addChild(da6c7544ccee32bd).( newKid );
1521 }
1522
1523 if ( newKid = getPartcxx . . $ SoBaseKit#getPart(795225bb0fb495d5).( "childList"cxx . . $ SbName#SbName(85c52e162fed56f9)., FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! ))
1524 answer->addChildcxx . . $ SoGroup#addChild(da6c7544ccee32bd).( newKid );
1525
1526 answer->unrefNoDeletecxx . . $ SoBase#unrefNoDelete(83f5f38750778ac8).();
1527 return answer;
1528 }
1529
1530 void
1531 GeneralizedCylindercxx . . $ GeneralizedCylinder#::changeCurveClosurecxx . . $ GeneralizedCylinder#changeCurveClosure(a07d8cccb7673f5a).( char *curveName, SbBoolcxx . . $ SbBool# newClosed )
1532 {
1533 SoCoordinate3cxx . . $ SoCoordinate3# *coords = SO_GET_PARTcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoBaseKit.h:420:9`!( this, curveName, SoCoordinate3 );
1534
1535 SoMFVec3fcxx . . $ SoMFVec3f# *cField = &coords->pointcxx . . $ SoCoordinate3#point.;
1536 int numC = cField->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).();
1537 if ( newClosed == TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`! ) {
1538 if ( numC > 0 ) {
1539 // make a new final point that is a copy of the zero'th
1540 if ( numC > 1 && ((*cField)[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).0] ==cxx . . $ `operator==`(648f52454fd9f27). (*cField)[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).numC-1] ))
1541 // First make sure that the first and last points aren't already
1542 // already the same.
1543 return;
1544 else
1545 cField->set1Valuecxx . . $ SoMFVec3f#set1Value(9c7ea36464c471ee).( numC, (*cField)[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).0] );
1546 }
1547 }
1548 else if ( numC > 1 ) {
1549 // remove the last point
1550 if ( (*cField)[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).0] !=cxx . . $ `operator!=`(648f52454fd9f27). (*cField)[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).numC-1] )
1551 // First make sure that the first and last points are the same.
1552 return;
1553 else
1554 cField->deleteValuescxx . . $ SoMField#deleteValues(3e454b8ccf442868).( numC - 1, 1 );
1555 }
1556 }
1557
1558 void
1559 GeneralizedCylindercxx . . $ GeneralizedCylinder#::changeWithTextureCoordscxx . . $ GeneralizedCylinder#changeWithTextureCoords(d4f767463ce0a6b3).( SbBoolcxx . . $ SbBool# newWith )
1560 {
1561 if ( withTextureCoordscxx . . $ GeneralizedCylinder#withTextureCoords..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() != newWith )
1562 withTextureCoordscxx . . $ GeneralizedCylinder#withTextureCoords. =cxx . . $ SoSFShort#`operator=`(14a1761c3ef4450f). newWith;
1563
1564 if ( newWith ) {
1565 setcxx . . $ SoBaseKit#set(1ef8e6ec083aabb9).( "textureBinding { value PER_VERTEX }");
1566 setcxx . . $ SoBaseKit#set(1ef8e6ec083aabb9).( "capTextureBinding { value PER_VERTEX_INDEXED }");
1567 setcxx . . $ SoBaseKit#set(1ef8e6ec083aabb9).( "texture2 { filename \"defaultTexture.rgb\" }" );
1568 }
1569 else {
1570
1571 // The texture2 and texture2Transform parts may have some useful
1572 // information, so we check them before deleting.
1573 // The others can just go bye-bye
1574
1575 SoTexture2cxx . . $ SoTexture2# *tex2 = (SoTexture2cxx . . $ SoTexture2# *) getPartcxx . . $ SoBaseKit#getPart(795225bb0fb495d5).("texture2"cxx . . $ SbName#SbName(85c52e162fed56f9).,FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`!);
1576 if ( tex2 != NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! ) {
1577 tex2->filenamecxx . . $ SoTexture2#filename. =cxx . . $ SoSFString#`operator=`(c81cdb6690d6e8d6). ""cxx . . $ SbString#SbString(85c52e162fed56f9).;
1578 if (tex2->hasDefaultValuescxx . . $ SoFieldContainer#hasDefaultValues(455f465bc33b4cdf).())
1579 setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).("texture2"cxx . . $ SbName#SbName(85c52e162fed56f9)., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! );
1580 }
1581 SoTexture2Transformcxx . . $ SoTexture2Transform# *txXf
1582 = (SoTexture2Transformcxx . . $ SoTexture2Transform# *) getPartcxx . . $ SoBaseKit#getPart(795225bb0fb495d5).("texture2Transform"cxx . . $ SbName#SbName(85c52e162fed56f9).,FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`!);
1583 if ( txXf != NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! ) {
1584 if (txXf->hasDefaultValuescxx . . $ SoFieldContainer#hasDefaultValues(455f465bc33b4cdf).())
1585 setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).("texture2Transform"cxx . . $ SbName#SbName(85c52e162fed56f9)., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! );
1586 }
1587
1588 setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).("textureBinding"cxx . . $ SbName#SbName(85c52e162fed56f9)., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! );
1589 setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).("capTextureBinding"cxx . . $ SbName#SbName(85c52e162fed56f9)., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! );
1590
1591 setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).("textureCoords"cxx . . $ SbName#SbName(85c52e162fed56f9)., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! );
1592 setPartcxx . . $ SoBaseKit#setPart(f51ac197d1d04faa).("capTextureCoords"cxx . . $ SbName#SbName(85c52e162fed56f9)., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! );
1593 }
1594 }
1595
1596 void
1597 GeneralizedCylindercxx . . $ GeneralizedCylinder#::calculateFullProfilecxx . . $ GeneralizedCylinder#calculateFullProfile(49f6e7a06ebc5aa8).()
1598 {
1599 SoCoordinate3cxx . . $ SoCoordinate3# *profC = SO_GET_PARTcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoBaseKit.h:420:9`!( this, "profileCoords", SoCoordinate3 );
1600 SoCoordinate3cxx . . $ SoCoordinate3# *spinC = SO_GET_PARTcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoBaseKit.h:420:9`!( this, "spineCoords", SoCoordinate3 );
1601 SoCoordinate3cxx . . $ SoCoordinate3# *twisC = SO_GET_PARTcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoBaseKit.h:420:9`!( this, "twistCoords", SoCoordinate3 );
1602
1603 int numInProf = profC->pointcxx . . $ SoCoordinate3#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).();
1604
1605 // Start by just copying profC into fullProfile...
1606 int i = numInProf - fullProfilecxx . . $ GeneralizedCylinder#fullProfile.->pointcxx . . $ SoCoordinate3#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).();
1607 if ( i > 0 )
1608 fullProfilecxx . . $ GeneralizedCylinder#fullProfile.->pointcxx . . $ SoCoordinate3#point..insertSpacecxx . . $ SoMField#insertSpace(3e454b8ccf442868).(0, i);
1609 else if ( i < 0 )
1610 fullProfilecxx . . $ GeneralizedCylinder#fullProfile.->pointcxx . . $ SoCoordinate3#point..deleteValuescxx . . $ SoMField#deleteValues(3e454b8ccf442868).(0, -i);
1611 fullProfilecxx . . $ GeneralizedCylinder#fullProfile.->pointcxx . . $ SoCoordinate3#point..setValuescxx . . $ SoMFVec3f#setValues(5f546bd7717b455b).(0,numInProf,profC->pointcxx . . $ SoCoordinate3#point..getValuescxx . . $ SoMFVec3f#getValues(aa6f7bb3bba6ed95).(0));
1612
1613 // Next, add in any points in the spine curve that are not demarcated
1614 // in the profile curve.
1615 for ( i = 0; i < spinC->pointcxx . . $ SoCoordinate3#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).(); i++ ) {
1616 // Get parametric distance of point along length of spine.
1617 float pDist = spineParamDistancescxx . . $ GeneralizedCylinder#spineParamDistances.[i];
1618 float pHeight = profileMinYcxx . . $ GeneralizedCylinder#profileMinY. + pDist * profileHeightcxx . . $ GeneralizedCylinder#profileHeight.;
1619
1620 // Translate this parametric distance into a point or points in
1621 // the profile curve.
1622 SbVec3fcxx . . $ SbVec3f# p0cxx . . $ SbVec3f#SbVec3f(49f6e7a06ebc5aa8)., p1cxx . . $ SbVec3f#SbVec3f(49f6e7a06ebc5aa8)., profPointcxx . . $ SbVec3f#SbVec3f(49f6e7a06ebc5aa8).;
1623 float amt;
1624 for ( int j = 0; j < fullProfilecxx . . $ GeneralizedCylinder#fullProfile.->pointcxx . . $ SoCoordinate3#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() - 1; j++ ) {
1625 p0 =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). fullProfilecxx . . $ GeneralizedCylinder#fullProfile.->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).j];
1626 p1 =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). fullProfilecxx . . $ GeneralizedCylinder#fullProfile.->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).j+1];
1627 // If the spine point falls at a point along the profile that
1628 // lies between p0 and p1, then interpolate and add it in.
1629 if ( pHeight > p0[cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).1] && pHeight < p1[cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).1] ) {
1630 amt = (pHeight - p0[cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).1]) / (p1[cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).1] - p0[cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).1]);
1631 profPoint =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). p0 +cxx . . $ operator+(af63bf8d0639b76b). amt *cxx . . $ `operator*`(c40767b2d90b93cf). ( p1 -cxx . . $ operator-(af63bf8d0639b76b). p0);
1632 // Add the point
1633 fullProfilecxx . . $ GeneralizedCylinder#fullProfile.->pointcxx . . $ SoCoordinate3#point..insertSpacecxx . . $ SoMField#insertSpace(3e454b8ccf442868).(j+1,1);
1634 fullProfilecxx . . $ GeneralizedCylinder#fullProfile.->pointcxx . . $ SoCoordinate3#point..set1Valuecxx . . $ SoMFVec3f#set1Value(9c7ea36464c471ee).(j+1,profPoint);
1635 j++;
1636 }
1637 else if ( pHeight < p0[cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).1] && pHeight > p1[cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).1] ) {
1638 amt = (pHeight - p1[cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).1]) / (p0[cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).1] - p1[cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).1]);
1639 profPoint =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). p1 +cxx . . $ operator+(af63bf8d0639b76b). amt *cxx . . $ `operator*`(c40767b2d90b93cf). ( p0 -cxx . . $ operator-(af63bf8d0639b76b). p1);
1640 // Add the point
1641 fullProfilecxx . . $ GeneralizedCylinder#fullProfile.->pointcxx . . $ SoCoordinate3#point..insertSpacecxx . . $ SoMField#insertSpace(3e454b8ccf442868).(j+1,1);
1642 fullProfilecxx . . $ GeneralizedCylinder#fullProfile.->pointcxx . . $ SoCoordinate3#point..set1Valuecxx . . $ SoMFVec3f#set1Value(9c7ea36464c471ee).(j+1,profPoint);
1643 j++;
1644 }
1645 }
1646 }
1647
1648 // Next, add in any points in the twist curve that are not demarcated
1649 // in the profile curve.
1650 for ( i = 0; i < twisC->pointcxx . . $ SoCoordinate3#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).(); i++ ) {
1651 }
1652
1653
1654 if ( numInProf < 2 )
1655 return;
1656
1657 if ( minNumRowscxx . . $ GeneralizedCylinder#minNumRows..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() > numInProf ) {
1658
1659 float overDist = profileLengthcxx . . $ GeneralizedCylinder#profileLength. / minNumRowscxx . . $ GeneralizedCylinder#minNumRows..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).();
1660 SbVec3fcxx . . $ SbVec3f# p0cxx . . $ SbVec3f#SbVec3f(49f6e7a06ebc5aa8)., p1cxx . . $ SbVec3f#SbVec3f(49f6e7a06ebc5aa8)., newPtcxx . . $ SbVec3f#SbVec3f(49f6e7a06ebc5aa8)., diffcxx . . $ SbVec3f#SbVec3f(49f6e7a06ebc5aa8).;
1661 float length;
1662 for ( int i = 0; i < fullProfilecxx . . $ GeneralizedCylinder#fullProfile.->pointcxx . . $ SoCoordinate3#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() - 1; i++ ) {
1663 p0 =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). fullProfilecxx . . $ GeneralizedCylinder#fullProfile.->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).i];
1664 p1 =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). fullProfilecxx . . $ GeneralizedCylinder#fullProfile.->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).i+1];
1665 diff =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). p1 -cxx . . $ operator-(af63bf8d0639b76b). p0;
1666 length = diff.lengthcxx . . $ SbVec3f#length(5036dfe8d4170af2).();
1667 diff.normalizecxx . . $ SbVec3f#normalize(9b8c9e39889c762c).();
1668 if ( length > overDist ) {
1669 newPt =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). p0 +cxx . . $ operator+(af63bf8d0639b76b). diff *cxx . . $ `operator*`(8301011090c64e0f). overDist;
1670 fullProfilecxx . . $ GeneralizedCylinder#fullProfile.->pointcxx . . $ SoCoordinate3#point..insertSpacecxx . . $ SoMField#insertSpace(3e454b8ccf442868).(i+1,1);
1671 fullProfilecxx . . $ GeneralizedCylinder#fullProfile.->pointcxx . . $ SoCoordinate3#point..set1Valuecxx . . $ SoMFVec3f#set1Value(9c7ea36464c471ee).(i+1,newPt);
1672 }
1673 }
1674 }
1675 }
1676 void
1677 GeneralizedCylindercxx . . $ GeneralizedCylinder#::calculateFullCrossSectioncxx . . $ GeneralizedCylinder#calculateFullCrossSection(49f6e7a06ebc5aa8).()
1678 {
1679 SoCoordinate3cxx . . $ SoCoordinate3# *crosC = SO_GET_PARTcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoBaseKit.h:420:9`!( this, "crossSectionCoords", SoCoordinate3 );
1680
1681 int numInCross = crosC->pointcxx . . $ SoCoordinate3#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).();
1682
1683 // Start by just copying crosC into fullCrossSection...
1684 int i = numInCross - fullCrossSectioncxx . . $ GeneralizedCylinder#fullCrossSection.->pointcxx . . $ SoCoordinate3#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).();
1685 if ( i > 0 )
1686 fullCrossSectioncxx . . $ GeneralizedCylinder#fullCrossSection.->pointcxx . . $ SoCoordinate3#point..insertSpacecxx . . $ SoMField#insertSpace(3e454b8ccf442868).(0, i);
1687 else if ( i < 0 )
1688 fullCrossSectioncxx . . $ GeneralizedCylinder#fullCrossSection.->pointcxx . . $ SoCoordinate3#point..deleteValuescxx . . $ SoMField#deleteValues(3e454b8ccf442868).(0, -i);
1689 fullCrossSectioncxx . . $ GeneralizedCylinder#fullCrossSection.->pointcxx . . $ SoCoordinate3#point..setValuescxx . . $ SoMFVec3f#setValues(5f546bd7717b455b).( 0, numInCross, crosC->pointcxx . . $ SoCoordinate3#point..getValuescxx . . $ SoMFVec3f#getValues(aa6f7bb3bba6ed95).(0));
1690
1691 if ( numInCross < 2 )
1692 return;
1693
1694 if ( minNumColscxx . . $ GeneralizedCylinder#minNumCols..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() > numInCross ) {
1695
1696 float overDist = crossSectionLengthcxx . . $ GeneralizedCylinder#crossSectionLength. / minNumColscxx . . $ GeneralizedCylinder#minNumCols..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).();
1697 SbVec3fcxx . . $ SbVec3f# p0cxx . . $ SbVec3f#SbVec3f(49f6e7a06ebc5aa8)., p1cxx . . $ SbVec3f#SbVec3f(49f6e7a06ebc5aa8)., newPtcxx . . $ SbVec3f#SbVec3f(49f6e7a06ebc5aa8)., diffcxx . . $ SbVec3f#SbVec3f(49f6e7a06ebc5aa8).;
1698 float length;
1699 for ( int i = 0; i < fullCrossSectioncxx . . $ GeneralizedCylinder#fullCrossSection.->pointcxx . . $ SoCoordinate3#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).() - 1; i++ ) {
1700 p0 =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). fullCrossSectioncxx . . $ GeneralizedCylinder#fullCrossSection.->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).i];
1701 p1 =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). fullCrossSectioncxx . . $ GeneralizedCylinder#fullCrossSection.->pointcxx . . $ SoCoordinate3#point.[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).i+1];
1702 diff =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). p1 -cxx . . $ operator-(af63bf8d0639b76b). p0;
1703 length = diff.lengthcxx . . $ SbVec3f#length(5036dfe8d4170af2).();
1704 diff.normalizecxx . . $ SbVec3f#normalize(9b8c9e39889c762c).();
1705 if ( length > overDist ) {
1706 newPt =cxx . . $ SbVec3f#`operator=`(c7808628d070cfbe). p0 +cxx . . $ operator+(af63bf8d0639b76b). diff *cxx . . $ `operator*`(8301011090c64e0f). overDist;
1707 fullCrossSectioncxx . . $ GeneralizedCylinder#fullCrossSection.->pointcxx . . $ SoCoordinate3#point..insertSpacecxx . . $ SoMField#insertSpace(3e454b8ccf442868).(i+1,1);
1708 fullCrossSectioncxx . . $ GeneralizedCylinder#fullCrossSection.->pointcxx . . $ SoCoordinate3#point..set1Valuecxx . . $ SoMFVec3f#set1Value(9c7ea36464c471ee).(i+1,newPt);
1709 }
1710 }
1711 }
1712 }
1713
1714 void
1715 GeneralizedCylindercxx . . $ GeneralizedCylinder#::fieldsChangedCBcxx . . $ GeneralizedCylinder#fieldsChangedCB(c8d298b3e215c027).(void *data, SoSensorcxx . . $ SoSensor# *sens )
1716 {
1717 if ( ((SoDataSensorcxx . . $ SoDataSensor# *)sens)->getTriggerNodecxx . . $ SoDataSensor#getTriggerNode(b794963b450d51b3).() != data )
1718 return;
1719
1720 GeneralizedCylindercxx . . $ GeneralizedCylinder# *s = (GeneralizedCylindercxx . . $ GeneralizedCylinder# *)data;
1721
1722 SoFieldcxx . . $ SoField# *triggerField = ((SoDataSensorcxx . . $ SoDataSensor# *)sens)->getTriggerFieldcxx . . $ SoDataSensor#getTriggerField(c4a4d937024b6702).();
1723 SbBoolcxx . . $ SbBool# flagFieldChanged = FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`!;
1724
1725 if (triggerField == &s->renderShapeTypecxx . . $ GeneralizedCylinder#renderShapeType.)
1726 flagFieldChanged = TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!;
1727 else if (triggerField == &s->normsFlippedcxx . . $ GeneralizedCylinder#normsFlipped.)
1728 flagFieldChanged = TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!;
1729 else if (triggerField == &s->profileClosedcxx . . $ GeneralizedCylinder#profileClosed.)
1730 flagFieldChanged = TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!;
1731 else if (triggerField == &s->crossSectionClosedcxx . . $ GeneralizedCylinder#crossSectionClosed.)
1732 flagFieldChanged = TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!;
1733 else if (triggerField == &s->spineClosedcxx . . $ GeneralizedCylinder#spineClosed.)
1734 flagFieldChanged = TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!;
1735 else if (triggerField == &s->twistClosedcxx . . $ GeneralizedCylinder#twistClosed.)
1736 flagFieldChanged = TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!;
1737 else if (triggerField == &s->minNumRowscxx . . $ GeneralizedCylinder#minNumRows.)
1738 flagFieldChanged = TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!;
1739 else if (triggerField == &s->minNumColscxx . . $ GeneralizedCylinder#minNumCols.)
1740 flagFieldChanged = TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!;
1741 else if (triggerField == &s->withSidescxx . . $ GeneralizedCylinder#withSides.)
1742 flagFieldChanged = TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!;
1743 else if (triggerField == &s->withTopCapcxx . . $ GeneralizedCylinder#withTopCap.)
1744 flagFieldChanged = TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!;
1745 else if (triggerField == &s->withBottomCapcxx . . $ GeneralizedCylinder#withBottomCap.)
1746 flagFieldChanged = TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!;
1747 else if (triggerField == &s->withTextureCoordscxx . . $ GeneralizedCylinder#withTextureCoords.)
1748 flagFieldChanged = TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!;
1749
1750 if (flagFieldChanged == FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! )
1751 return;
1752
1753 // Special stuff to do if a curve's closurehas been changed
1754 if ( s->profileClosedcxx . . $ GeneralizedCylinder#profileClosed..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() != s->profileAlreadyClosedcxx . . $ GeneralizedCylinder#profileAlreadyClosed. ) {
1755 s->changeCurveClosurecxx . . $ GeneralizedCylinder#changeCurveClosure(a07d8cccb7673f5a).( "profileCoords", s->profileClosedcxx . . $ GeneralizedCylinder#profileClosed..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() );
1756 s->profileAlreadyClosedcxx . . $ GeneralizedCylinder#profileAlreadyClosed. = s->profileClosedcxx . . $ GeneralizedCylinder#profileClosed..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).();
1757 }
1758 if ( s->crossSectionClosedcxx . . $ GeneralizedCylinder#crossSectionClosed..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() != s->crossSectionAlreadyClosedcxx . . $ GeneralizedCylinder#crossSectionAlreadyClosed. ) {
1759 s->changeCurveClosurecxx . . $ GeneralizedCylinder#changeCurveClosure(a07d8cccb7673f5a).( "crossSectionCoords",
1760 s->crossSectionClosedcxx . . $ GeneralizedCylinder#crossSectionClosed..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() );
1761 s->crossSectionAlreadyClosedcxx . . $ GeneralizedCylinder#crossSectionAlreadyClosed. = s->crossSectionClosedcxx . . $ GeneralizedCylinder#crossSectionClosed..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).();
1762 }
1763 if ( s->spineClosedcxx . . $ GeneralizedCylinder#spineClosed..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() != s->spineAlreadyClosedcxx . . $ GeneralizedCylinder#spineAlreadyClosed. ) {
1764 s->changeCurveClosurecxx . . $ GeneralizedCylinder#changeCurveClosure(a07d8cccb7673f5a).( "spineCoords", s->spineClosedcxx . . $ GeneralizedCylinder#spineClosed..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() );
1765 s->spineAlreadyClosedcxx . . $ GeneralizedCylinder#spineAlreadyClosed. = s->spineClosedcxx . . $ GeneralizedCylinder#spineClosed..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).();
1766 }
1767 if ( s->twistClosedcxx . . $ GeneralizedCylinder#twistClosed..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() != s->twistAlreadyClosedcxx . . $ GeneralizedCylinder#twistAlreadyClosed. ) {
1768 s->changeCurveClosurecxx . . $ GeneralizedCylinder#changeCurveClosure(a07d8cccb7673f5a).( "twistCoords", s->twistClosedcxx . . $ GeneralizedCylinder#twistClosed..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() );
1769 s->twistAlreadyClosedcxx . . $ GeneralizedCylinder#twistAlreadyClosed. = s->twistClosedcxx . . $ GeneralizedCylinder#twistClosed..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).();
1770 }
1771
1772 // Special stuff to do if a curve's texture status has been changed
1773 if ( s->withTextureCoordscxx . . $ GeneralizedCylinder#withTextureCoords..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() != s->alreadyWithTextureCoordscxx . . $ GeneralizedCylinder#alreadyWithTextureCoords.) {
1774 s->changeWithTextureCoordscxx . . $ GeneralizedCylinder#changeWithTextureCoords(d4f767463ce0a6b3).( s->withTextureCoordscxx . . $ GeneralizedCylinder#withTextureCoords..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).() );
1775 s->alreadyWithTextureCoordscxx . . $ GeneralizedCylinder#alreadyWithTextureCoords. = s->withTextureCoordscxx . . $ GeneralizedCylinder#withTextureCoords..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).();
1776 }
1777
1778 s->updateSurfacecxx . . $ GeneralizedCylinder#updateSurface(49f6e7a06ebc5aa8).();
1779 }
1780
1781 void
1782 GeneralizedCylindercxx . . $ GeneralizedCylinder#::inputChangedCBcxx . . $ GeneralizedCylinder#inputChangedCB(c8d298b3e215c027).(void *data, SoSensorcxx . . $ SoSensor# *sens )
1783 {
1784 GeneralizedCylindercxx . . $ GeneralizedCylinder# *s = (GeneralizedCylindercxx . . $ GeneralizedCylinder# *)data;
1785 SoNodecxx . . $ SoNode# *notifier = ((SoNodeSensorcxx . . $ SoNodeSensor# *)sens)->getTriggerNodecxx . . $ SoDataSensor#getTriggerNode(b794963b450d51b3).();
1786
1787 SoCoordinate3cxx . . $ SoCoordinate3# *coordPart = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!;
1788 SbBoolcxx . . $ SbBool# isClosed;
1789
1790 coordPart = SO_CHECK_PARTcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoBaseKit.h:422:9`!( s, "profileCoords", SoCoordinate3 );
1791 if ( notifier == coordPart )
1792 isClosed = s->profileClosedcxx . . $ GeneralizedCylinder#profileClosed..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).();
1793 else {
1794 coordPart = SO_CHECK_PARTcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoBaseKit.h:422:9`!( s, "crossSectionCoords", SoCoordinate3 );
1795 if ( notifier == coordPart )
1796 isClosed = s->crossSectionClosedcxx . . $ GeneralizedCylinder#crossSectionClosed..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).();
1797 else {
1798 coordPart = SO_CHECK_PARTcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoBaseKit.h:422:9`!( s, "spineCoords", SoCoordinate3 );
1799 if ( notifier == coordPart )
1800 isClosed = s->spineClosedcxx . . $ GeneralizedCylinder#spineClosed..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).();
1801 else {
1802 coordPart = SO_CHECK_PARTcxx . . $ `lib/nodekits/include/Inventor/nodekits/SoBaseKit.h:422:9`!( s, "twistCoords", SoCoordinate3 );
1803 if ( notifier == coordPart )
1804 isClosed = s->twistClosedcxx . . $ GeneralizedCylinder#twistClosed..getValuecxx . . $ SoSFShort#getValue(524863554b4a534e).();
1805 else
1806 coordPart = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!;
1807 }
1808 }
1809 }
1810
1811 if (coordPart == NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!)
1812 return;
1813
1814 if (isClosed) {
1815 SoMFVec3fcxx . . $ SoMFVec3f# *cField = &(coordPart->pointcxx . . $ SoCoordinate3#point.);
1816 int numC = cField->getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).();
1817 // make the last point follow the first point.
1818 if ( numC == 3 )
1819 cField->set1Valuecxx . . $ SoMFVec3f#set1Value(9c7ea36464c471ee).( numC, (*cField)[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).0] );
1820 else if ( numC > 3 && (*cField)[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).0] !=cxx . . $ `operator!=`(648f52454fd9f27). (*cField)[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).numC - 1] )
1821 cField->set1Valuecxx . . $ SoMFVec3f#set1Value(9c7ea36464c471ee).( numC - 1, (*cField)[cxx . . $ SoMFVec3f#`operator[]`(e550528ef0703ba8).0] );
1822 }
1823
1824 // Clamp the values of the profile coordinates so that
1825 // no values are below zero:
1826 if (coordPart == s->profileCoordscxx . . $ GeneralizedCylinder#profileCoords..getValuecxx . . $ SoSFNode#getValue(b794963b450d51b3).()) {
1827 SbBoolcxx . . $ SbBool# changed = FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`!;
1828 coordPart->pointcxx . . $ SoCoordinate3#point..enableNotifycxx . . $ SoField#enableNotify(7864480464b09eea).(FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`!);
1829 SbVec3fcxx . . $ SbVec3f# *pCoords = coordPart->pointcxx . . $ SoCoordinate3#point..startEditingcxx . . $ SoMFVec3f#startEditing(d7218d170b8c46e1).();
1830 for ( int i = 0; i < coordPart->pointcxx . . $ SoCoordinate3#point..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).(); i++ ) {
1831 if ( pCoords[i][cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).0] < 0.0 ) {
1832 pCoords[i].setValuecxx . . $ SbVec3f#setValue(4e87f9d875f2d08d).( 0.0, pCoords[i][cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).1], pCoords[i][cxx . . $ SbVec3f#`operator[]`(5dbdaf238659ae67).2] );
1833 changed = TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!;
1834 }
1835 }
1836 coordPart->pointcxx . . $ SoCoordinate3#point..finishEditingcxx . . $ SoMFVec3f#finishEditing(49f6e7a06ebc5aa8).();
1837 coordPart->pointcxx . . $ SoCoordinate3#point..enableNotifycxx . . $ SoField#enableNotify(7864480464b09eea).(TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!);
1838 if (changed) {
1839 // return now -- changing the coords will trigger notification
1840 // and bring us back here.
1841 coordPart->pointcxx . . $ SoCoordinate3#point..touchcxx . . $ SoField#touch(49f6e7a06ebc5aa8).();
1842 }
1843 }
1844
1845 s->updateSurfacecxx . . $ GeneralizedCylinder#updateSurface(49f6e7a06ebc5aa8).();
1846 }
1847
1848
1849 void
1850 GeneralizedCylindercxx . . $ GeneralizedCylinder#::updateSurroundingManipcxx . . $ GeneralizedCylinder#updateSurroundingManip(49f6e7a06ebc5aa8).()
1851 {
1852 SoNodecxx . . $ SoNode# *n;
1853
1854 // Is there a transform?
1855 n = getPartcxx . . $ SoBaseKit#getPart(795225bb0fb495d5).( "transform"cxx . . $ SbName#SbName(85c52e162fed56f9)., FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`!);
1856 if (n==NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!) return;
1857
1858 // If it's not a transform manip, then return...
1859 if ( !n->isOfTypecxx . . $ SoBase#isOfType(1fd66475a268b64e).( SoTransformManipcxx . . $ SoTransformManip#::getClassTypeIdcxx . . $ SoTransformManip#getClassTypeId(c00c150378d2b968).() ) )
1860 return;
1861
1862 SoTransformManipcxx . . $ SoTransformManip# *xfm = (SoTransformManipcxx . . $ SoTransformManip# *) n;
1863
1864 // Try to get the dragger from the manip.
1865 SoDraggercxx . . $ SoDragger# *d = xfm->getDraggercxx . . $ SoTransformManip#getDragger(c79b48bf84989e60).();
1866 if (d==NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!)
1867 return;
1868
1869 SoSurroundScalecxx . . $ SoSurroundScale# *ss
1870 = (SoSurroundScalecxx . . $ SoSurroundScale# *) d->getPartcxx . . $ SoBaseKit#getPart(795225bb0fb495d5).( "surroundScale"cxx . . $ SbName#SbName(85c52e162fed56f9)., FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`! );
1871
1872 if ( ss != NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!)
1873 ss->invalidatecxx . . $ SoSurroundScale#invalidate(49f6e7a06ebc5aa8).();
1874 }
1875
1876 void
1877 GeneralizedCylindercxx . . $ GeneralizedCylinder#::changeTransformTypecxx . . $ GeneralizedCylinder#changeTransformType(3e4432a9d5c0ee1c).( SoTypecxx . . $ SoType# newType )
1878 {
1879 // Return if manip is already of correct type.
1880 SoTransformcxx . . $ SoTransform# *curXf = (SoTransformcxx . . $ SoTransform# *) getPartcxx . . $ SoBaseKit#getPart(795225bb0fb495d5).("transform"cxx . . $ SbName#SbName(85c52e162fed56f9).,FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`!);
1881 if ( curXf && (curXf->getTypeIdcxx . . $ SoTransform#getTypeId(70775439ff16cb15).() ==cxx . . $ SoType#`operator==`(1fd66475a268b64e). newType ))
1882 return;
1883
1884
1885 if ( newType.isBadcxx . . $ SoType#isBad(455f465bc33b4cdf).() ||
1886 ! newType.isDerivedFromcxx . . $ SoType#isDerivedFrom(1fd66475a268b64e).(SoTransformManipcxx . . $ SoTransformManip#::getClassTypeIdcxx . . $ SoTransformManip#getClassTypeId(c00c150378d2b968).() ) ||
1887 ! newType.canCreateInstancecxx . . $ SoType#canCreateInstance(455f465bc33b4cdf).() ) {
1888
1889 // If no transform part, just return:
1890 SoFullPathcxx . . $ SoFullPath# *xfPath = (SoFullPathcxx . . $ SoFullPath# *) createPathToPartcxx . . $ SoBaseKit#createPathToPart(4d0459bce448ca3e).("transform"cxx . . $ SbName#SbName(85c52e162fed56f9).,FALSEcxx . . $ `lib/database/include/Inventor/SbBasic.h:79:12`!);
1891 if ( ! xfPath )
1892 return;
1893
1894 // If tail is not an SoTransformManip, just return.
1895 SoNodecxx . . $ SoNode# *tail = xfPath->getTailcxx . . $ SoFullPath#getTail(b794963b450d51b3).();
1896 if ( ! tail->isOfTypecxx . . $ SoBase#isOfType(1fd66475a268b64e).( SoTransformManipcxx . . $ SoTransformManip#::getClassTypeIdcxx . . $ SoTransformManip#getClassTypeId(c00c150378d2b968).() ) )
1897 return;
1898
1899 // Tail is an SoTransformManip. Tell it to replace itself with
1900 // a regular transform
1901 xfPath->refcxx . . $ SoBase#ref(83f5f38750778ac8).();
1902 tail->refcxx . . $ SoBase#ref(83f5f38750778ac8).();
1903 SoTransformManipcxx . . $ SoTransformManip# *m = (SoTransformManipcxx . . $ SoTransformManip# *) tail;
1904 m->replaceManipcxx . . $ SoTransformManip#replaceManip(3dc441bc9f2aa2e7).(xfPath, new SoTransformcxx . . $ SoTransform# );
1905 tail->unrefcxx . . $ SoBase#unref(83f5f38750778ac8).();
1906 xfPath->unrefcxx . . $ SoBase#unref(83f5f38750778ac8).();
1907 }
1908 else {
1909
1910 // Make a manip of given type, tell it to insert itself in the path
1911 SoPathcxx . . $ SoPath# *xfPath = createPathToPartcxx . . $ SoBaseKit#createPathToPart(4d0459bce448ca3e).("transform"cxx . . $ SbName#SbName(85c52e162fed56f9).,TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!);
1912 SoTransformManipcxx . . $ SoTransformManip# *m = (SoTransformManipcxx . . $ SoTransformManip# *) newType.createInstancecxx . . $ SoType#createInstance(45a5c5ac6be858a8).();
1913 xfPath->refcxx . . $ SoBase#ref(83f5f38750778ac8).();
1914 m->replaceNodecxx . . $ SoTransformManip#replaceNode(5891dcbbfb166ede).(xfPath );
1915 xfPath->unrefcxx . . $ SoBase#unref(83f5f38750778ac8).();
1916 }
1917 }