ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
SoLAr Class Reference

SoLAr - Inventor version of the G4Cons Geant Geometry entity. More...

#include <SoLAr.h>

Inheritance diagram for SoLAr:
Collaboration diagram for SoLAr:

Public Member Functions

 SoLAr ()
 Constructor, required. More...
 
virtual void generateAlternateRep ()
 Generate AlternateRep, required. More...
 
virtual void clearAlternateRep ()
 We better be able to clear it, too! More...
 

Static Public Member Functions

static void initClass ()
 Class Initializer, required. More...
 

Public Attributes

SoMFFloat fRmin
 Inside radii. More...
 
SoMFFloat fRmax
 Outside radii. More...
 
SoMFFloat fDz
 Z Positions. More...
 
SoSFFloat fSPhi
 Starting angle, in radians. More...
 
SoSFFloat fDPhi
 Delta-angle, in radians. More...
 
SoSFBool smoothDraw
 An Inventor option - slightly better render, worse performance. More...
 
SoSFInt32 pOverrideNPhi
 Override number of phi subdivision used for rendering shape (i.e. More...
 
SoSFNode alternateRep
 Alternate rep required - for use by users without HEPVis shared objects. More...
 

Protected Member Functions

virtual void computeBBox (SoAction *action, SbBox3f &box, SbVec3f &center)
 compute bounding Box, required More...
 
virtual void generatePrimitives (SoAction *action)
 Generate Primitives, required. More...
 
virtual SoChildList * getChildren () const
 GetChildList, required whenever the class has hidden children. More...
 
virtual ~SoLAr ()
 Destructor, required. More...
 

Private Member Functions

 SO_NODE_HEADER (SoLAr)
 
void generateChildren ()
 Generate Children. More...
 
void updateChildren ()
 Used to modify hidden children when a data field is changed. More...
 
void inc (double &sinPhi, double &cosPhi, double sinDeltaPhi, double cosDeltaPhi) const
 help with trigonometry. increments sines an cosines by an angle. More...
 

Private Attributes

SoChildList * m_children
 ChildList. Required whenever the class has hidden children. More...
 

Detailed Description

SoLAr - Inventor version of the G4Cons Geant Geometry entity.

Node: SoLAr

Description: The Inventor version of the G4Cons Geant Geometry entity

Author: Joe Boudreau Nov 2004

Definition at line 36 of file SoLAr.h.

Constructor & Destructor Documentation

◆ SoLAr()

SoLAr::SoLAr ( )

Constructor, required.

Definition at line 35 of file SoLAr.cxx.

35  {
36  // This statement is required
37  SO_NODE_CONSTRUCTOR(SoLAr);
38 
39  // Data fields are initialized like this:
40  SO_NODE_ADD_FIELD(fRmin, (0.0));
41  SO_NODE_ADD_FIELD(fRmax, (0.0));
42  SO_NODE_ADD_FIELD(fDz, (0.0));
43  SO_NODE_ADD_FIELD(fSPhi, (0.0));
44  SO_NODE_ADD_FIELD(fDPhi, ((float)(2*M_PI)));
45  SO_NODE_ADD_FIELD(smoothDraw, (TRUE));
46  SO_NODE_ADD_FIELD(pOverrideNPhi, (0));
47  SO_NODE_ADD_FIELD(alternateRep, (NULL));
48  m_children = new SoChildList(this);
49 
50  float rMinDef[]={10.0, 15.0, 10.0};
51  float rMaxDef[]={11.0, 17.0, 12.0};
52  float zDef []={-10.0, 0.0, 10.0};
53 
54  fRmin.setValues(0,2,rMinDef);
55  fRmax.setValues(0,2,rMaxDef);
56  fDz.setValues(0,2,zDef);
57  setNodeType(EXTENSION);
58 }

◆ ~SoLAr()

SoLAr::~SoLAr ( )
protectedvirtual

Destructor, required.

Definition at line 61 of file SoLAr.cxx.

61  {
62  delete m_children;
63 }

Member Function Documentation

◆ clearAlternateRep()

void SoLAr::clearAlternateRep ( )
virtual

We better be able to clear it, too!

Definition at line 504 of file SoLAr.cxx.

504  {
505  alternateRep.setValue(NULL);
506 }

◆ computeBBox()

void SoLAr::computeBBox ( SoAction *  action,
SbBox3f &  box,
SbVec3f &  center 
)
protectedvirtual

compute bounding Box, required

Definition at line 273 of file SoLAr.cxx.

273  {
274  if (fRmax.getNum()< 2) return;
275  if (fRmin.getNum()< 2) return;
276  if (fDz.getNum() < 2) return;
277 
278  double MinMin = fRmin[0];
279  double MaxMax = fRmax[0];
280 
281  double ZMin = fDz[0];
282  double ZMax = fDz[0];
283 
284 
285  for (int i=1;i<fRmin.getNum();i++) {
286  if (fRmin[i]<MinMin) MinMin=fRmin[i];
287  }
288 
289  for (int i=1;i<fRmax.getNum();i++) {
290  if (fRmax[i]>MaxMax) MaxMax=fRmax[i];
291  }
292 
293  for (int i=1;i<fDz.getNum();i++) {
294  if (fDz[i]>ZMax) ZMax=fDz[i];
295  if (fDz[i]<ZMin) ZMin=fDz[i];
296  }
297 
298  RevolutionSurfaceUtil::setBBoxPars(fSPhi.getValue(), fDPhi.getValue(),
299  MinMin, MaxMax,
300  ZMin,ZMax,
301  box, center );
302 }

◆ generateAlternateRep()

void SoLAr::generateAlternateRep ( )
virtual

Generate AlternateRep, required.

Generating an alternate representation must be done upon users request. It allows an Inventor program to read back the file without requiring this code to be dynamically linked. If the users expects that this code will be dynamically linked, he need not invoke this method.

Definition at line 493 of file SoLAr.cxx.

493  {
494 
495  // This routine sets the alternate representation to the child
496  // list of this mode.
497 
498  if (m_children->getLength() == 0) generateChildren();
499  updateChildren();
500  alternateRep.setValue((SoSeparator *) ( *m_children)[0]);
501 }

◆ generateChildren()

void SoLAr::generateChildren ( )
private

Generate Children.

Used to create the hidden children. Required whenever the node has hidden children.

Definition at line 465 of file SoLAr.cxx.

465  {
466 #ifdef IMPLEMENTED
467  // (Not implemented so you do not get an alternate rep. Too bad.)
468 
469 
470  // This routines creates one SoSeparator, one SoCoordinate3, and
471  // one SoLineSet, and puts it in the child list. This is done only
472  // once, whereas redrawing the position of the coordinates occurs each
473  // time an update is necessary, in the updateChildren routine.
474 
475  assert(m_children->getLength() ==0);
476  SoSeparator *sep = new SoSeparator();
477  SoCoordinate3 *theCoordinates = new SoCoordinate3();
478  SoNormal *theNormals = new SoNormal();
479  SoNormalBinding *theNormalBinding = new SoNormalBinding();
480  SoIndexedFaceSet *theFaceSet = new SoIndexedFaceSet();
481  //
482  // This line costs some in render quality! but gives speed.
483  //
484  sep->addChild(theCoordinates);
485  sep->addChild(theNormals);
486  sep->addChild(theNormalBinding);
487  sep->addChild(theFaceSet);
488  m_children->append(sep);
489 #endif
490 }

◆ generatePrimitives()

void SoLAr::generatePrimitives ( SoAction *  action)
protectedvirtual

Generate Primitives, required.

Definition at line 76 of file SoLAr.cxx.

76  {
77  // This variable is used to store each vertex
78  SoPrimitiveVertex pv;
79 
80  // Access the stat from the action
81  SoState *state = action->getState();
82  if (!state)
83  return;
84 
85  // See if we have to use a texture coordinate function,
86  // rather than generating explicit texture coordinates.
87  SbBool useTexFunction=
89  SoTextureCoordinateElement::FUNCTION);
90 
91  // If we need to generate texture coordinates with a function,
92  // we'll need an SoGLTextureCoordinateElement. Otherwise, we'll
93  // set up the coordinates directly.
94  const SoTextureCoordinateElement *tce = NULL;
95  SbVec4f texCoord;
96  if (useTexFunction) {
97  tce = SoTextureCoordinateElement::getInstance(state);
98  } else {
99  texCoord[2] = 0.0;
100  texCoord[3] = 1.0;
101  }
102  SbVec3f point, normal;
103 
105  //-----------------------------------------------------
106 #define GEN_VERTEX(pv,x,y,z,s,t,nx,ny,nz) \
107  point.setValue((float)(x),(float)(y),(float)(z)); \
108  normal.setValue((float)(nx),(float)(ny),(float)(nz)); \
109  if (useTexFunction) { \
110  texCoord=tce->get(point,normal); \
111  } else { \
112  texCoord[0]=(float)(s); \
113  texCoord[1]=(float)(t); \
114  } \
115  pv.setPoint(point); \
116  pv.setNormal(normal); \
117  pv.setTextureCoords(texCoord); \
118  shapeVertex(&pv);
119  //-----------------------------------------------------
121 
122  if (fRmin.getNum()!=fRmax.getNum() || fRmax.getNum() != fDz.getNum()) {
123  return;
124  }
125 
126  int nSeg = fRmin.getNum()-1;
127  if (nSeg<1) {
128  return;
129  }
130 
131  for (int p=0;p<nSeg;p++) {
132 
133  double rMin1= fRmin[p];
134  double rMin2= fRmin[p+1];
135 
136  double rMax1= fRmax[p];
137  double rMax2= fRmax[p+1];
138 
139  double zMin = fDz[p];
140  double zMax= fDz[p+1];
141 
142  int NPHI = RevolutionSurfaceUtil::nphiDivisions( fDPhi.getValue(), this->getComplexityValue(action), pOverrideNPhi.getValue() );
143 
144  double deltaPhi = fDPhi.getValue()/NPHI;
145  double phi0 = fSPhi.getValue();
146  double phi1 = phi0 + fDPhi.getValue();
147  double cosPhi0 = cos(phi0);
148  double sinPhi0 = sin(phi0);
149  double cosPhi1 = cos(phi1);
150  double sinPhi1 = sin(phi1);
151  double cosDeltaPhi = cos(deltaPhi);
152  double sinDeltaPhi = sin(deltaPhi);
153 
154  int i;
155  double sinPhi;
156  double cosPhi;
157 
158  //
159  // The outer surface!
160  //
161  if (1)
162  {
163  double dR =rMax2-rMax1;
164  double dZ =zMax-zMin;
165  double cosTheta = -dR/sqrt(dR*dR+dZ*dZ);
166  double sinTheta = dZ/sqrt(dR*dR+dZ*dZ);
167 
168  beginShape(action,TRIANGLE_STRIP);
169  sinPhi=sinPhi0;
170  cosPhi=cosPhi0;
171  for (i = 0; i<=NPHI; i++) {
172  GEN_VERTEX(pv,rMax2*cosPhi,rMax2*sinPhi,zMax,0.0,0.0,sinTheta*cosPhi,sinTheta*sinPhi,cosTheta);
173  GEN_VERTEX(pv,rMax1*cosPhi,rMax1*sinPhi,zMin,1.0,1.0,sinTheta*cosPhi,sinTheta*sinPhi,cosTheta);
174  inc(sinPhi, cosPhi, sinDeltaPhi, cosDeltaPhi);
175  }
176  endShape();
177  }
178  if (1)
179  //
180  // The inner surface!
181  //
182  {
183  beginShape(action,TRIANGLE_STRIP);
184  sinPhi=sinPhi0;
185  cosPhi=cosPhi0;
186 
187  double dR =rMin2-rMin1;
188  double dZ =zMax-zMin;
189  double cosTheta = -dR/sqrt(dR*dR+dZ*dZ);
190  double sinTheta = dZ/sqrt(dR*dR+dZ*dZ);
191 
192  for (i = 0; i<=NPHI; i++) {
193  GEN_VERTEX(pv,rMin2*cosPhi,rMin2*sinPhi,zMax,0.0,0.0,-cosPhi*sinTheta,-sinPhi*sinTheta,-cosTheta);
194  GEN_VERTEX(pv,rMin1*cosPhi,rMin1*sinPhi,zMin,1.0,1.0,-cosPhi*sinTheta,-sinPhi*sinTheta,-cosTheta);
195  inc(sinPhi, cosPhi, sinDeltaPhi, cosDeltaPhi);
196  }
197 
198  endShape();
199  }
200 
201  if (1) {
202  if (fabs(deltaPhi)<2.0*M_PI) {
203  //
204  // The end
205  //
206  beginShape(action,TRIANGLE_STRIP);
207  sinPhi=sinPhi0;
208  cosPhi=cosPhi0;
209  GEN_VERTEX(pv,rMax2*cosPhi,rMax2*sinPhi,zMax,0.0,0.0,sinPhi,-cosPhi,0);
210  GEN_VERTEX(pv,rMax1*cosPhi,rMax1*sinPhi,zMin,1.0,1.0,sinPhi,-cosPhi,0);
211  GEN_VERTEX(pv,rMin2*cosPhi,rMin2*sinPhi,zMax,1.0,0.0,sinPhi,-cosPhi,0);
212  GEN_VERTEX(pv,rMin1*cosPhi,rMin1*sinPhi,zMin,0.0,1.0,sinPhi,-cosPhi,0);
213  endShape();
214  //
215  // The other end
216  //
217  beginShape(action,TRIANGLE_STRIP);
218  sinPhi=sinPhi1;
219  cosPhi=cosPhi1;
220  GEN_VERTEX(pv,rMax2*cosPhi,rMax2*sinPhi, zMax,0.0,0.0,-sinPhi,+cosPhi,0);
221  GEN_VERTEX(pv,rMax1*cosPhi,rMax1*sinPhi, zMin,1.0,1.0,-sinPhi,+cosPhi,0);
222  GEN_VERTEX(pv,rMin2*cosPhi,rMin2*sinPhi, zMax,1.0,0.0,-sinPhi,+cosPhi,0);
223  GEN_VERTEX(pv,rMin1*cosPhi,rMin1*sinPhi, zMin,0.0,1.0,-sinPhi,+cosPhi,0);
224  endShape();
225  }
226  }
227  if (p==(nSeg-1)) {
228  //
229  // The outer surface at z=+PDZ
230  //
231  beginShape(action,TRIANGLE_STRIP);
232  sinPhi=sinPhi0;
233  cosPhi=cosPhi0;
234  for (i = 0; i<=NPHI; i++) {
235  GEN_VERTEX(pv,rMin2*cosPhi,rMin2*sinPhi,zMax,0.0,0.0,0,0,1);
236  GEN_VERTEX(pv,rMax2*cosPhi,rMax2*sinPhi,zMax,1.0,1.0,0,0,1);
237  inc(sinPhi, cosPhi, sinDeltaPhi, cosDeltaPhi);
238  }
239  endShape();
240  }
241  if (p==0) {
242  //
243  // The outer surface at z=-PDZ
244  //
245  beginShape(action,TRIANGLE_STRIP);
246  sinPhi=sinPhi0;
247  cosPhi=cosPhi0;
248  for (i = 0; i<=NPHI; i++) {
249  GEN_VERTEX(pv,rMin1*cosPhi,rMin1*sinPhi,zMin,0.0,0.0,0,0,-1);
250  GEN_VERTEX(pv,rMax1*cosPhi,rMax1*sinPhi,zMin,1.0,1.0,0,0,-1);
251  inc(sinPhi, cosPhi, sinDeltaPhi, cosDeltaPhi);
252  }
253  endShape();
254  }
255  }
256 
257  if (state&&state->isElementEnabled(SoGLCacheContextElement::getClassStackIndex())) {
258  //Encourage auto caching
259  SoGLCacheContextElement::shouldAutoCache(state, SoGLCacheContextElement::DO_AUTO_CACHE);
260 #if ((COIN_MAJOR_VERSION>=3)||((COIN_MAJOR_VERSION==2)&&(COIN_MINOR_VERSION>=5)))
261  SoGLCacheContextElement::incNumShapes(state);
262 #endif
263  }
264 }

◆ getChildren()

SoChildList * SoLAr::getChildren ( ) const
protectedvirtual

GetChildList, required whenever the class has hidden children.

Definition at line 267 of file SoLAr.cxx.

267  {
268  return m_children;
269 }

◆ inc()

void SoLAr::inc ( double &  sinPhi,
double &  cosPhi,
double  sinDeltaPhi,
double  cosDeltaPhi 
) const
inlineprivate

help with trigonometry. increments sines an cosines by an angle.

Definition at line 147 of file SoLAr.h.

147  {
148  double oldSin=sinPhi,oldCos=cosPhi;
149  sinPhi = oldSin*cosDeltaPhi+oldCos*sinDeltaPhi;
150  cosPhi = oldCos*cosDeltaPhi-oldSin*sinDeltaPhi;
151  }

◆ initClass()

void SoLAr::initClass ( )
static

Class Initializer, required.

Definition at line 66 of file SoLAr.cxx.

67 {
68  [[maybe_unused]] static const bool didInit = [&]() {
69  SO_NODE_INIT_CLASS(SoLAr,SoShape,"Shape");
70  return true;
71  }();
72 }

◆ SO_NODE_HEADER()

SoLAr::SO_NODE_HEADER ( SoLAr  )
private

◆ updateChildren()

void SoLAr::updateChildren ( )
private

Used to modify hidden children when a data field is changed.

Required whenever the class has hidden children.

Definition at line 308 of file SoLAr.cxx.

308  {
309 
310 #ifdef IMPLEMENTED
311 
312  // (Not implemented so you do not get an alternate rep. Too bad.)
313 
314  // Redraw the G4LAr....
315 
316  assert(m_children->getLength()==1);
317  SoSeparator *sep = (SoSeparator *) ( *m_children)[0];
318  SoCoordinate3 *theCoordinates = (SoCoordinate3 *) ( sep->getChild(0));
319  SoNormal *theNormals = (SoNormal *) ( sep->getChild(1));
320  SoNormalBinding *theNormalBinding = (SoNormalBinding *) ( sep->getChild(2));
321  SoIndexedFaceSet *theFaceSet = (SoIndexedFaceSet *) ( sep->getChild(3));
322 
323  const int NPHI=96, NPOINTS=2*(2*NPHI+2), NFACES=4*NPHI+2, NINDICES = NFACES*5;
324  float points[NPOINTS][3], normals[NFACES][3];
325 #ifdef INVENTOR2_0
326  static long indices[NINDICES];
327 #else
328  static int32_t indices[NINDICES];
329 #endif
330  static int init=0;
331  double phi, pp, DeltaPhi;
332 
333  // Indices need to be generated once! This is here to keep it close to the point
334  // generation, since otherwise it will be confusing.
335 
336  int i;
337  if (!init) {
338  init = 1;
339  // Outer face
340  for (i = 0; i< NPHI; i++) {
341  // 0 1 3 2;
342  indices[5*i+0] = 2*i+0;
343  indices[5*i+1] = 2*i+1;
344  indices[5*i+2] = 2*i+3;
345  indices[5*i+3] = 2*i+2;
346  indices[5*i+4] = SO_END_FACE_INDEX;
347  }
348  // the inner face
349  for (i=0;i<NPHI;i++) {
350  indices[5*1*NPHI + 5*i+0] = 2*NPHI+2 + 2*i+0;
351  indices[5*1*NPHI + 5*i+1] = 2*NPHI+2 + 2*i+1;
352  indices[5*1*NPHI + 5*i+2] = 2*NPHI+2 + 2*i+3;
353  indices[5*1*NPHI + 5*i+3] = 2*NPHI+2 + 2*i+2;
354  indices[5*1*NPHI + 5*i+4] = SO_END_FACE_INDEX;
355  }
356  // the top side
357  for (i=0;i<NPHI;i++) {
358  indices[5*2*NPHI + 5*i+0] = 2*i+0;
359  indices[5*2*NPHI + 5*i+1] = 2*i+2;
360  indices[5*2*NPHI + 5*i+2] = NPOINTS - (2*i+4);
361  indices[5*2*NPHI + 5*i+3] = NPOINTS - (2*i+2);
362  indices[5*2*NPHI + 5*i+4] = SO_END_FACE_INDEX;
363  }
364  // the bottom side
365  for (i=0;i<NPHI;i++) {
366  indices[5*3*NPHI + 5*i+0] = 2*i+1;
367  indices[5*3*NPHI + 5*i+1] = NPOINTS - (2*i+1);
368  indices[5*3*NPHI + 5*i+2] = NPOINTS - (2*i+3);
369  indices[5*3*NPHI + 5*i+3] = 2*i+3;
370  indices[5*3*NPHI + 5*i+4] = SO_END_FACE_INDEX;
371  }
372  // the odd side
373  indices[5*4*NPHI +0] = 2*NPHI;
374  indices[5*4*NPHI +1] = 2*NPHI+1;
375  indices[5*4*NPHI +2] = 2*NPHI+3;
376  indices[5*4*NPHI +3] = 2*NPHI+2;
377  indices[5*4*NPHI +4] = SO_END_FACE_INDEX;
378  // aother odd side
379  indices[5*4*NPHI +5 +0] = 0;
380  indices[5*4*NPHI +5 +1] = NPOINTS-2;
381  indices[5*4*NPHI +5 +2] = NPOINTS-1;
382  indices[5*4*NPHI +5 +3] = 1;
383  indices[5*4*NPHI +5 +4] = SO_END_FACE_INDEX;
384  }
385  // Points need to be generated each time:
386  // The outer surface
387  DeltaPhi = fDPhi.getValue()/NPHI, phi = fSPhi.getValue();
388  float t,st,ct;
389  t = FATAN((fRmax2.getValue()-fRmax1.getValue())/(2*fDz.getValue()));
390  st = FSIN(t);
391  ct = FCOS(t);
392  for (i = 0; i<=NPHI; i++) {
393  points[2*i+0][0] = fRmax2.getValue()*FCOS(phi);
394  points[2*i+0][1] = fRmax2.getValue()*FSIN(phi);
395  points[2*i+0][2] = +fDz.getValue();
396  points[2*i+1][0] = fRmax1.getValue()*FCOS(phi);
397  points[2*i+1][1] = fRmax1.getValue()*FSIN(phi);
398  points[2*i+1][2] = -fDz.getValue();
399  pp = phi+DeltaPhi/2.0;
400  if (i!=NPHI) {
401  normals[i][0] = ct * FCOS(pp);
402  normals[i][1] = ct * FSIN(pp);
403  normals[i][2] = -st;
404  }
405  phi+=DeltaPhi;
406  }
407  // The inner surface
408  phi = fSPhi.getValue() + fDPhi.getValue();
409  t = FATAN((fRmin2.getValue()-fRmin1.getValue())/(2*fDz.getValue()));
410  st = FSIN(t);
411  ct = FCOS(t);
412  for (i = 0; i<=NPHI; i++) {
413  points[2*NPHI+2+2*i+0][0] = fRmin2.getValue()*FCOS(phi);
414  points[2*NPHI+2+2*i+0][1] = fRmin2.getValue()*FSIN(phi);
415  points[2*NPHI+2+2*i+0][2] = +fDz.getValue();
416  points[2*NPHI+2+2*i+1][0] = fRmin1.getValue()*FCOS(phi);
417  points[2*NPHI+2+2*i+1][1] = fRmin1.getValue()*FSIN(phi);
418  points[2*NPHI+2+2*i+1][2] = -fDz.getValue();
419  pp = phi-DeltaPhi/2.0;
420  if (i!=NPHI) {
421  normals[NPHI+i][0] = -ct*FCOS(pp);
422  normals[NPHI+i][1] = -ct*FSIN(pp);
423  normals[NPHI+i][2] = st;
424  }
425  phi-=DeltaPhi;
426  }
427  // The top side
428  for (i=0;i<NPHI;i++) {
429  normals[2*NPHI+i][0]=normals[2*NPHI+i][1]=0;
430  normals[2*NPHI+i][2]= 1.0;
431  }
432  // The bottom side
433  for (i=0;i<NPHI;i++) {
434  normals[3*NPHI+i][0]=normals[3*NPHI+i][1]=0;
435  normals[3*NPHI+i][2]= -1.0;
436  }
437  // The odd side
438  phi = fSPhi.getValue();
439  normals[4*NPHI+0][0]= FSIN(phi);
440  normals[4*NPHI+0][1]= -FCOS(phi);
441  normals[4*NPHI+0][2]= 0;
442 
443  // Another odd side
444  phi = fSPhi.getValue()+fDPhi.getValue();
445  normals[4*NPHI+1][0]= -FSIN(phi);
446  normals[4*NPHI+1][1]= +FCOS(phi);
447  normals[4*NPHI+1][2]=0;
448 
449  for (int np=0;np<NPOINTS;np++) theCoordinates->point.set1Value(np,points[np][0],points[np][1],points[np][2]);
450  theFaceSet->coordIndex.setValues(0,NINDICES,indices);
451  if (smoothDraw.getValue()) {
452  // This Line is replaced by the next one because of an apparent Bug in Inventor (mem. leak).
453  // theNormals->vector.deleteValues(0);
454  for (int nf=0;nf<NFACES;nf++) theNormals->vector.set1Value(nf,normals[nf][0],normals[nf][1],normals[nf][2]);
455  theNormalBinding->value=SoNormalBinding::PER_FACE;
456  }
457  else {
458  for (int nf=0;nf<NFACES;nf++) theNormals->vector.set1Value(nf,normals[nf][0],normals[nf][1],normals[nf][2]);
459  theNormalBinding->value=SoNormalBinding::PER_FACE;
460  }
461 #endif
462 }

Member Data Documentation

◆ alternateRep

SoSFNode SoLAr::alternateRep

Alternate rep required - for use by users without HEPVis shared objects.

Definition at line 75 of file SoLAr.h.

◆ fDPhi

SoSFFloat SoLAr::fDPhi

Delta-angle, in radians.

Definition at line 62 of file SoLAr.h.

◆ fDz

SoMFFloat SoLAr::fDz

Z Positions.

Definition at line 54 of file SoLAr.h.

◆ fRmax

SoMFFloat SoLAr::fRmax

Outside radii.

Definition at line 50 of file SoLAr.h.

◆ fRmin

SoMFFloat SoLAr::fRmin

Inside radii.

Definition at line 46 of file SoLAr.h.

◆ fSPhi

SoSFFloat SoLAr::fSPhi

Starting angle, in radians.

Definition at line 58 of file SoLAr.h.

◆ m_children

SoChildList* SoLAr::m_children
private

ChildList. Required whenever the class has hidden children.

Definition at line 142 of file SoLAr.h.

◆ pOverrideNPhi

SoSFInt32 SoLAr::pOverrideNPhi

Override number of phi subdivision used for rendering shape (i.e.

ignore e.g. complexity value). Put field to 0 (the default) to ignore it.

Definition at line 71 of file SoLAr.h.

◆ smoothDraw

SoSFBool SoLAr::smoothDraw

An Inventor option - slightly better render, worse performance.

Definition at line 66 of file SoLAr.h.


The documentation for this class was generated from the following files:
FATAN
#define FATAN(x)
Definition: SbMath.h:18
SoLAr
SoLAr - Inventor version of the G4Cons Geant Geometry entity.
Definition: SoLAr.h:36
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
FCOS
#define FCOS(x)
Definition: SbMath.h:13
xAOD::deltaPhi
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
Definition: L2StandAloneMuon_v1.cxx:160
Trk::indices
std::pair< long int, long int > indices
Definition: AlSymMatBase.h:24
InDetAccessor::phi0
@ phi0
Definition: InDetAccessor.h:33
SoLAr::smoothDraw
SoSFBool smoothDraw
An Inventor option - slightly better render, worse performance.
Definition: SoLAr.h:66
M_PI
#define M_PI
Definition: ActiveFraction.h:11
SoLAr::fRmax
SoMFFloat fRmax
Outside radii.
Definition: SoLAr.h:50
GEN_VERTEX
#define GEN_VERTEX(pv, x, y, z, s, t, nx, ny, nz)
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
PlotPulseshapeFromCool.np
np
Definition: PlotPulseshapeFromCool.py:64
RevolutionSurfaceUtil::nphiDivisions
static int nphiDivisions(const float &dphi, const float &complexity, int OverrideNPhi=0)
Definition: RevolutionSurfaceUtil.h:21
SoLAr::generateChildren
void generateChildren()
Generate Children.
Definition: SoLAr.cxx:465
lumiFormat.i
int i
Definition: lumiFormat.py:92
RevolutionSurfaceUtil::setBBoxPars
static void setBBoxPars(const float &sphi, const float &dphi, const float &rmin, const float &rmax, const float &zmin, const float &zmax, SbBox3f &box, SbVec3f &center)
Definition: RevolutionSurfaceUtil.h:40
python.Constants.TRUE
bool TRUE
for job options legacy (TODO: get rid of these!) ----------------------—
Definition: Control/AthenaCommon/python/Constants.py:22
calibdata.ct
ct
Definition: calibdata.py:418
SoLAr::fDz
SoMFFloat fDz
Z Positions.
Definition: SoLAr.h:54
grepfile.sep
sep
Definition: grepfile.py:38
FSIN
#define FSIN(x)
Definition: SbMath.h:14
SoLAr::alternateRep
SoSFNode alternateRep
Alternate rep required - for use by users without HEPVis shared objects.
Definition: SoLAr.h:75
SoLAr::m_children
SoChildList * m_children
ChildList. Required whenever the class has hidden children.
Definition: SoLAr.h:142
python.PyKernel.init
def init(v_theApp, v_rootStream=None)
Definition: PyKernel.py:45
SoLAr::fSPhi
SoSFFloat fSPhi
Starting angle, in radians.
Definition: SoLAr.h:58
SoLAr::fDPhi
SoSFFloat fDPhi
Delta-angle, in radians.
Definition: SoLAr.h:62
SoLAr::updateChildren
void updateChildren()
Used to modify hidden children when a data field is changed.
Definition: SoLAr.cxx:308
compileRPVLLRates.nf
nf
Definition: compileRPVLLRates.py:89
python.CaloScaleNoiseConfig.action
action
Definition: CaloScaleNoiseConfig.py:77
python.changerun.pv
pv
Definition: changerun.py:81
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
Ringer::getType
T getType(const char *cStr)
Return Ringer enumeration of type T identifying string type:
SoLAr::pOverrideNPhi
SoSFInt32 pOverrideNPhi
Override number of phi subdivision used for rendering shape (i.e.
Definition: SoLAr.h:71
SoLAr::inc
void inc(double &sinPhi, double &cosPhi, double sinDeltaPhi, double cosDeltaPhi) const
help with trigonometry. increments sines an cosines by an angle.
Definition: SoLAr.h:147
SoLAr::fRmin
SoMFFloat fRmin
Inside radii.
Definition: SoLAr.h:46