ATLAS Offline Software
Loading...
Searching...
No Matches
SoGenericBox Class Reference

#include <SoGenericBox.h>

Inheritance diagram for SoGenericBox:
Collaboration diagram for SoGenericBox:

Public Member Functions

void setParametersForBox (float dx, float dy, float dz, float xcenter=0.0, float ycenter=0.0, float zcenter=0.0)
void setParametersForBarrelEtaPhiCell (double etaMin, double etaMax, double phiMin, double phiMax, double cellDepth, double cellDistance, double etasqueezefact=1.0, double phisqueezefact=1.0)
void setParametersForEndCapEtaPhiCell (double etaMin, double etaMax, double phiMin, double phiMax, double cellDepth, double cellDistance, double etasqueezefact=1.0, double phisqueezefact=1.0)
void setParametersForTrd (float dx1, float dx2, float dy1, float dy2, float dz)
void setParametersForTrapezoid (float dz, float theta, float phi, float dy1, float dx1, float dx2, float dy2, float dx3, float dx4, float alp1, float alp2)
void setGenericParameters (float x0, float y0, float z0, float x1, float y1, float z1, float x2, float y2, float z2, float x3, float y3, float z3, float x4, float y4, float z4, float x5, float y5, float z5, float x6, float y6, float z6, float x7, float y7, float z7)
 SoGenericBox ()
virtual void generateAlternateRep ()
virtual void clearAlternateRep ()

Static Public Member Functions

static void initClass ()

Public Attributes

SoSFBool drawEdgeLines
SoSFBool forceEdgeLinesInBaseColour
SoSFNode alternateRep

Protected Member Functions

virtual void computeBBox (SoAction *action, SbBox3f &box, SbVec3f &center)
virtual void generatePrimitives (SoAction *action)
virtual ~SoGenericBox ()

Private Member Functions

 SO_NODE_HEADER (SoGenericBox)
void internalSetParametersForEtaPhiCell (bool barrel, double etaMin, double etaMax, double phiMin, double phiMax, double cellDepth, double cellDistance, double etasqueezefact, double phisqueezefact)
void ensurePointsAllocated ()
void pointsUpdated ()
void setupDefaultPoints ()

Private Attributes

float * m_points
float * m_normals
SbBox3f m_bbox
SbVec3f m_center

Detailed Description

Definition at line 26 of file SoGenericBox.h.

Constructor & Destructor Documentation

◆ SoGenericBox()

SoGenericBox::SoGenericBox ( )

Definition at line 72 of file SoGenericBox.cxx.

73 : m_points(0), m_normals(0)
74{
75 SO_NODE_CONSTRUCTOR(SoGenericBox);
76 SO_NODE_ADD_FIELD(drawEdgeLines, (false));
77 SO_NODE_ADD_FIELD(forceEdgeLinesInBaseColour, (true));
78 SO_NODE_ADD_FIELD(alternateRep,(NULL));
79 setNodeType(EXTENSION);
80}
SoSFNode alternateRep
float * m_points
SoSFBool forceEdgeLinesInBaseColour
float * m_normals
SoSFBool drawEdgeLines

◆ ~SoGenericBox()

SoGenericBox::~SoGenericBox ( )
protectedvirtual

Definition at line 83 of file SoGenericBox.cxx.

84{
85 delete [] m_normals;
86 delete [] m_points;
87}

Member Function Documentation

◆ clearAlternateRep()

void SoGenericBox::clearAlternateRep ( )
virtual

Definition at line 473 of file SoGenericBox.cxx.

474{
475 alternateRep.setValue(NULL);
476 //Hmm... no ref/unref??
477}

◆ computeBBox()

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

Definition at line 180 of file SoGenericBox.cxx.

180 {
181 if (!m_points)
183 box = m_bbox;
184 center = m_center;
185}
void setupDefaultPoints()
SbVec3f m_center

◆ ensurePointsAllocated()

void SoGenericBox::ensurePointsAllocated ( )
private

Definition at line 167 of file SoGenericBox.cxx.

168{
169 if (!m_points)
170 m_points = new float[SOGENERICBOX_NPOINTS*3];
171}
static const int SOGENERICBOX_NPOINTS

◆ generateAlternateRep()

void SoGenericBox::generateAlternateRep ( )
virtual

Definition at line 438 of file SoGenericBox.cxx.

439{
440 if (!m_points)
442 if (alternateRep.getValue())
444 SoSeparator * sep = new SoSeparator;
445
446 //Vertice coordinates:
447 SoVertexProperty *vertices = new SoVertexProperty();
448 for (int i=0;i<SOGENERICBOX_NPOINTS;++i)
449 vertices->vertex.set1Value ( i, m_points[i*3+0],m_points[i*3+1],m_points[i*3+2] );
450 SoIndexedFaceSet * faceset = new SoIndexedFaceSet;
451 faceset->coordIndex.setValues(0,5*6, sogenericbox_vindices_foraltrepfaces);
452 faceset->vertexProperty = vertices;
453 sep->addChild(faceset);
454
455 if (drawEdgeLines.getValue()) {
456//Disable the lightmodel now since we in any case gets baselightning with the lineset defined this way...
457// if (forceEdgeLinesInBaseColour.getValue()) {
458// SoLightModel * lm = new SoLightModel;//Fixme: share
459// lm->model = SoLightModel::BASE_COLOR;
460// sep->addChild(lm);
461// }
462 SoIndexedLineSet * lineset = new SoIndexedLineSet;
463 lineset->coordIndex.setValues(0,20,sogenericbox_vindices_foraltreplines);
464 lineset->vertexProperty = vertices;
465 sep->addChild(lineset);
466 }
467
468 alternateRep.setValue(sep);
469
470}
static int sogenericbox_vindices_foraltreplines[20]
static int sogenericbox_vindices_foraltrepfaces[5 *SOGENERICBOX_NFACES]
virtual void clearAlternateRep()

◆ generatePrimitives()

void SoGenericBox::generatePrimitives ( SoAction * action)
protectedvirtual

Definition at line 90 of file SoGenericBox.cxx.

90 {
91
92 if (!m_points)
94
95 // Access the state from the action
96 SoState *state = action->getState();
97
98 if ( action->getTypeId().isDerivedFrom(SoPickAction::getClassTypeId()) ) {
99 //For picking:
100
101 SoPrimitiveVertex vertex;
102 beginShape(action,QUADS);
103 int *iptr = sogenericbox_vindices;
104 for (int i=0;i<SOGENERICBOX_NFACES;++i) {
105 for (int j = 0; j < 4; ++j) {
106 const int ivert = *iptr++;
107 vertex.setPoint(SbVec3f(m_points[ivert*3+0], m_points[ivert*3+1], m_points[ivert*3+2]));
108 shapeVertex(&vertex);
109 }
110 }
111 endShape();
112 } else {
113
114 glBegin(GL_QUADS);
115 int *iptr = sogenericbox_vindices;
116 for (int i=0;i<SOGENERICBOX_NFACES;i++) {
117 glNormal3fv(static_cast<const GLfloat*>(&m_normals[i*3]));
118 for (int j = 0; j < 4; j++)
119 glVertex3fv(static_cast<const GLfloat*>(&m_points[(*iptr++)*3]));
120 }
121 glEnd();
122
123
124 if (drawEdgeLines.getValue()) {
125
126 SbColor outlineColour;
127 const bool customColour = SoOutlineColour::get(state, outlineColour);
128 // Preserve Coin's colour/material state, including GL_COLOR_MATERIAL.
129 if (customColour)
130 glPushAttrib(GL_CURRENT_BIT | GL_LIGHTING_BIT);
131 const bool disableLighting((customColour || forceEdgeLinesInBaseColour.getValue()) && glIsEnabled(GL_LIGHTING));
132 const bool transparencyOn = glIsEnabled(GL_BLEND);
133
134 if (disableLighting) glDisable(GL_LIGHTING);
135 if (transparencyOn) glDisable(GL_BLEND);
136 if (customColour)
137 glColor3fv(outlineColour.getValue());
138#define trdV(i) glVertex3fv(static_cast<const GLfloat*>(&m_points[i*3]));
139 glBegin(GL_LINE_STRIP);
140 trdV(0)trdV(1)trdV(2)trdV(3)trdV(0)trdV(4)trdV(5)trdV(6)trdV(7)trdV(4)
141 glEnd();
142
143 glBegin(GL_LINES);
144 trdV(3)trdV(7)
145 trdV(6)trdV(2)
146 trdV(5)trdV(1)
147 glEnd();
148
149 if (disableLighting) glEnable(GL_LIGHTING);
150 if (transparencyOn) glEnable(GL_BLEND);
151 if (customColour)
152 glPopAttrib();
153 }
154 }
155
156 if (state&&state->isElementEnabled(SoGLCacheContextElement::getClassStackIndex())) {
157 //Encourage auto caching
158 SoGLCacheContextElement::shouldAutoCache(state, SoGLCacheContextElement::DO_AUTO_CACHE);
159#if ((COIN_MAJOR_VERSION>=3)||((COIN_MAJOR_VERSION==2)&&(COIN_MINOR_VERSION>=5)))
160 SoGLCacheContextElement::incNumShapes(state);
161#endif
162 }
163
164}
if(pathvar)
static const int SOGENERICBOX_NFACES
static int sogenericbox_vindices[]
#define trdV(i)
static bool get(SoState *, SbColor &)
float j(const xAOD::IParticle &, const xAOD::TrackMeasurementValidation &hit, const Eigen::Matrix3d &jab_inv)

◆ initClass()

void SoGenericBox::initClass ( )
static

Definition at line 63 of file SoGenericBox.cxx.

64{
65 [[maybe_unused]] static const bool didInit = [&]() {
66 SO_NODE_INIT_CLASS(SoGenericBox, SoShape, "Shape");
67 return true;
68 }();
69}

◆ internalSetParametersForEtaPhiCell()

void SoGenericBox::internalSetParametersForEtaPhiCell ( bool barrel,
double etaMin,
double etaMax,
double phiMin,
double phiMax,
double cellDepth,
double cellDistance,
double etasqueezefact,
double phisqueezefact )
private

Definition at line 203 of file SoGenericBox.cxx.

207{
209 if (phiMax<phiMin) std::swap(phiMin,phiMax);
210 if (etaMax<etaMin) std::swap(etaMin,etaMax);
211
212 if (etasqueezefact!=1.0) {
213 double etashift(0.5*(1.0-etasqueezefact)*fabs(etaMax-etaMin));
214 etaMax -= etashift;
215 etaMin += etashift;
216 }
217 if (phisqueezefact!=1.0) {
218 double phishift(0.5*(1.0-phisqueezefact)*fabs(phiMax-phiMin));
219 phiMax -= phishift;
220 phiMin += phishift;
221 }
222
223 if (cellDistance<0) cellDistance = -cellDistance;
224 if (cellDepth<0) cellDistance = std::max(cellDistance-cellDepth,0.0);
225 double tantheta2 = tan(2*atan(exp(-etaMin)));
226 double tantheta1 = tan(2*atan(exp(-etaMax)));
227 const double cpMin(cos(phiMin));
228 const double cpMax(cos(phiMax));
229 const double spMin(sin(phiMin));
230 const double spMax(sin(phiMax));
231 if (barrel) {
232 const double rf = cellDistance;
233 const double rb = cellDistance+cellDepth;
234 const double rfdivtantheta1(rf/tantheta1);
235 const double rbdivtantheta1(rb/tantheta1);
236 const double rfdivtantheta2(rf/tantheta2);
237 const double rbdivtantheta2(rb/tantheta2);
238 m_points[0*3+0] = rf*cpMin; m_points[0*3+1] = rf*spMin; m_points[0*3+2] = rfdivtantheta1;
239 m_points[1*3+0] = rf*cpMin; m_points[1*3+1] = rf*spMin; m_points[1*3+2] = rfdivtantheta2;
240 m_points[2*3+0] = rf*cpMax; m_points[2*3+1] = rf*spMax; m_points[2*3+2] = rfdivtantheta2;
241 m_points[3*3+0] = rf*cpMax; m_points[3*3+1] = rf*spMax; m_points[3*3+2] = rfdivtantheta1;
242 m_points[4*3+0] = rb*cpMin; m_points[4*3+1] = rb*spMin; m_points[4*3+2] = rbdivtantheta1;
243 m_points[5*3+0] = rb*cpMin; m_points[5*3+1] = rb*spMin; m_points[5*3+2] = rbdivtantheta2;
244 m_points[6*3+0] = rb*cpMax; m_points[6*3+1] = rb*spMax; m_points[6*3+2] = rbdivtantheta2;
245 m_points[7*3+0] = rb*cpMax; m_points[7*3+1] = rb*spMax; m_points[7*3+2] = rbdivtantheta1;
246 } else {
247 const double eta(0.5*(etaMin+etaMax));
248 const double zf(eta>0?cellDistance:-cellDistance);
249 double zb = (zf > 0 ? zf+cellDepth: zf-cellDepth);
250 m_points[0*3+0] = zf*tantheta1*cpMin; m_points[0*3+1] = zf*tantheta1*spMin; m_points[0*3+2] = zf;
251 m_points[1*3+0] = zf*tantheta2*cpMin; m_points[1*3+1] = zf*tantheta2*spMin; m_points[1*3+2] = zf;
252 m_points[2*3+0] = zf*tantheta2*cpMax; m_points[2*3+1] = zf*tantheta2*spMax; m_points[2*3+2] = zf;
253 m_points[3*3+0] = zf*tantheta1*cpMax; m_points[3*3+1] = zf*tantheta1*spMax; m_points[3*3+2] = zf;
254 m_points[4*3+0] = zb*tantheta1*cpMin; m_points[4*3+1] = zb*tantheta1*spMin; m_points[4*3+2] = zb;
255 m_points[5*3+0] = zb*tantheta2*cpMin; m_points[5*3+1] = zb*tantheta2*spMin; m_points[5*3+2] = zb;
256 m_points[6*3+0] = zb*tantheta2*cpMax; m_points[6*3+1] = zb*tantheta2*spMax; m_points[6*3+2] = zb;
257 m_points[7*3+0] = zb*tantheta1*cpMax; m_points[7*3+1] = zb*tantheta1*spMax; m_points[7*3+2] = zb;
258 }
259
261}
Scalar eta() const
pseudorapidity method
void ensurePointsAllocated()
void swap(ElementLinkVector< DOBJ > &lhs, ElementLinkVector< DOBJ > &rhs)

◆ pointsUpdated()

void SoGenericBox::pointsUpdated ( )
private

Definition at line 384 of file SoGenericBox.cxx.

385{
386 //Normals:
387 if (!m_normals)
388 m_normals = new float[SOGENERICBOX_NFACES*3];
389 for (int iface = 0; iface < SOGENERICBOX_NFACES; ++iface) {
390 const int index_v1 = sogenericbox_vindices[iface*4+0];
391 const int index_v2 = sogenericbox_vindices[iface*4+1];
392 const int index_v3 = sogenericbox_vindices[iface*4+2];
393
394 //Figure out normal: (v2-v1)(x)(v3-v1)
395 const double v1X(m_points[index_v1*3+0]), v1Y(m_points[index_v1*3+1]), v1Z(m_points[index_v1*3+2]);
396 const double edge1X(m_points[index_v2*3+0]-v1X), edge1Y(m_points[index_v2*3+1]-v1Y), edge1Z(m_points[index_v2*3+2]-v1Z);
397 const double edge2X(m_points[index_v3*3+0]-v1X), edge2Y(m_points[index_v3*3+1]-v1Y), edge2Z(m_points[index_v3*3+2]-v1Z);
398
399 double nx(edge1Y*edge2Z-edge1Z*edge2Y);
400 double ny(edge1Z*edge2X-edge1X*edge2Z);
401 double nz(edge1X*edge2Y-edge1Y*edge2X);
402 double nl(nx*nx+ny*ny+nz*nz);
403 if (nl<=0) {
404 std::cout<<"SoGenericBox::Error Could not calculate normal due to degenerate face edge"<<std::endl;
405 nx=1.0;ny=0.0;nz=0.0;nl=1;
406 //Fixme: We should try to use index_v4 instead of one vertex,
407 //to get the normal (this would allow faces where one edge was
408 //collapsed).
409 //const int index_v4 = sogenericbox_vindices[iface*4+3];
410 }
411 const double s(1.0/sqrt(nl));
412 m_normals[iface*3+0] = nx*s;
413 m_normals[iface*3+1] = ny*s;
414 m_normals[iface*3+2] = nz*s;
415 }
416
417 //BBox:
418 float xmin(1.0e99), ymin(1.0e99), zmin(1.0e99);//fixme: -> inf
419 float xmax(-1.0e99), ymax(-1.0e99), zmax(-1.0e99);
420 for (int i=0;i<SOGENERICBOX_NPOINTS;++i) {
421 const float x(m_points[i*3+0]), y(m_points[i*3+1]), z(m_points[i*3+2]);
422 xmin = std::min(xmin,x); xmax = std::max(xmax,x);
423 ymin = std::min(ymin,y); ymax = std::max(ymax,y);
424 zmin = std::min(zmin,z); zmax = std::max(zmax,z);
425 }
426 m_bbox.setBounds (xmin, ymin, zmin, xmax, ymax, zmax);
427 m_center.setValue(0.5*(xmin+xmax),0.5*(ymin+ymax),0.5*(zmin+zmax));
428
429 drawEdgeLines.touch();
430}
#define y
#define x
#define z
double xmax
Definition listroot.cxx:61
double ymin
Definition listroot.cxx:63
double xmin
Definition listroot.cxx:60
double ymax
Definition listroot.cxx:64

◆ setGenericParameters()

void SoGenericBox::setGenericParameters ( float x0,
float y0,
float z0,
float x1,
float y1,
float z1,
float x2,
float y2,
float z2,
float x3,
float y3,
float z3,
float x4,
float y4,
float z4,
float x5,
float y5,
float z5,
float x6,
float y6,
float z6,
float x7,
float y7,
float z7 )

Definition at line 362 of file SoGenericBox.cxx.

370{
372 m_points[0*3+0] = x0; m_points[0*3+1] = y0; m_points[0*3+2] = z0;
373 m_points[1*3+0] = x1; m_points[1*3+1] = y1; m_points[1*3+2] = z1;
374 m_points[2*3+0] = x2; m_points[2*3+1] = y2; m_points[2*3+2] = z2;
375 m_points[3*3+0] = x3; m_points[3*3+1] = y3; m_points[3*3+2] = z3;
376 m_points[4*3+0] = x4; m_points[4*3+1] = y4; m_points[4*3+2] = z4;
377 m_points[5*3+0] = x5; m_points[5*3+1] = y5; m_points[5*3+2] = z5;
378 m_points[6*3+0] = x6; m_points[6*3+1] = y6; m_points[6*3+2] = z6;
379 m_points[7*3+0] = x7; m_points[7*3+1] = y7; m_points[7*3+2] = z7;
381}

◆ setParametersForBarrelEtaPhiCell()

void SoGenericBox::setParametersForBarrelEtaPhiCell ( double etaMin,
double etaMax,
double phiMin,
double phiMax,
double cellDepth,
double cellDistance,
double etasqueezefact = 1.0,
double phisqueezefact = 1.0 )

Definition at line 265 of file SoGenericBox.cxx.

269{
270 internalSetParametersForEtaPhiCell( true, etaMin, etaMax, phiMin, phiMax,
271 cellDepth, cellDistance, etasqueezefact, phisqueezefact );
272}
void internalSetParametersForEtaPhiCell(bool barrel, double etaMin, double etaMax, double phiMin, double phiMax, double cellDepth, double cellDistance, double etasqueezefact, double phisqueezefact)

◆ setParametersForBox()

void SoGenericBox::setParametersForBox ( float dx,
float dy,
float dz,
float xcenter = 0.0,
float ycenter = 0.0,
float zcenter = 0.0 )

Definition at line 188 of file SoGenericBox.cxx.

189 {
191 m_points[0*3+0] = xcenter+dx; m_points[0*3+1] = ycenter+dy; m_points[0*3+2] = zcenter-dz;
192 m_points[1*3+0] = xcenter-dx; m_points[1*3+1] = ycenter+dy; m_points[1*3+2] = zcenter-dz;
193 m_points[2*3+0] = xcenter-dx; m_points[2*3+1] = ycenter-dy; m_points[2*3+2] = zcenter-dz;
194 m_points[3*3+0] = xcenter+dx; m_points[3*3+1] = ycenter-dy; m_points[3*3+2] = zcenter-dz;
195 m_points[4*3+0] = xcenter+dx; m_points[4*3+1] = ycenter+dy; m_points[4*3+2] = zcenter+dz;
196 m_points[5*3+0] = xcenter-dx; m_points[5*3+1] = ycenter+dy; m_points[5*3+2] = zcenter+dz;
197 m_points[6*3+0] = xcenter-dx; m_points[6*3+1] = ycenter-dy; m_points[6*3+2] = zcenter+dz;
198 m_points[7*3+0] = xcenter+dx; m_points[7*3+1] = ycenter-dy; m_points[7*3+2] = zcenter+dz;
200}

◆ setParametersForEndCapEtaPhiCell()

void SoGenericBox::setParametersForEndCapEtaPhiCell ( double etaMin,
double etaMax,
double phiMin,
double phiMax,
double cellDepth,
double cellDistance,
double etasqueezefact = 1.0,
double phisqueezefact = 1.0 )

Definition at line 275 of file SoGenericBox.cxx.

279{
280 internalSetParametersForEtaPhiCell( false, etaMin, etaMax, phiMin, phiMax,
281 cellDepth, cellDistance, etasqueezefact, phisqueezefact );
282}

◆ setParametersForTrapezoid()

void SoGenericBox::setParametersForTrapezoid ( float dz,
float theta,
float phi,
float dy1,
float dx1,
float dx2,
float dy2,
float dx3,
float dx4,
float alp1,
float alp2 )

Definition at line 302 of file SoGenericBox.cxx.

306{
308 const float tanTheta(tan(theta));
309 const float TthetaCphi = tanTheta*cos(phi);
310 const float TthetaSphi = tanTheta*sin(phi);
311 const float Talp1 = tan(alp1);
312 const float Talp2 = tan(alp2);
313
314 m_points[0*3+0] = dx2+dy1*Talp1;
315 m_points[0*3+1] = dy1;
316 m_points[0*3+2] = -dz;
317
318 m_points[1*3+0] = -dx2+dy1*Talp1;
319 m_points[1*3+1] = dy1;
320 m_points[1*3+2] = -dz;
321
322 m_points[2*3+0] = -dx1-dy1*Talp1;
323 m_points[2*3+1] = -dy1;
324 m_points[2*3+2] = -dz;
325
326 m_points[3*3+0] = dx1-dy1*Talp1;
327 m_points[3*3+1] = -dy1;
328 m_points[3*3+2] = -dz;
329
330 m_points[4*3+0] = dx4+dy2*Talp2;
331 m_points[4*3+1] = dy2;
332 m_points[4*3+2] = dz;
333
334 m_points[5*3+0] = -dx4+dy2*Talp2;
335 m_points[5*3+1] = dy2;
336 m_points[5*3+2] = dz;
337
338 m_points[6*3+0] = -dx3-dy2*Talp2;
339 m_points[6*3+1] = -dy2;
340 m_points[6*3+2] = dz;
341
342 m_points[7*3+0] = dx3-dy2*Talp2;
343 m_points[7*3+1] = -dy2;
344 m_points[7*3+2] = dz;
345
346 const float dzTthetaCphi(dz*TthetaCphi);
347 const float dzTthetaSphi(dz*TthetaSphi);
348 int i;
349 for (i=0;i<4;i++) {
350 m_points[i*3+0] -= dzTthetaCphi;
351 m_points[i*3+1] -= dzTthetaSphi;
352 }
353 for (i=4;i<8;i++) {
354 m_points[i*3+0] += dzTthetaCphi;
355 m_points[i*3+1] += dzTthetaSphi;
356 }
358}
Scalar phi() const
phi method
Scalar theta() const
theta method

◆ setParametersForTrd()

void SoGenericBox::setParametersForTrd ( float dx1,
float dx2,
float dy1,
float dy2,
float dz )

Definition at line 285 of file SoGenericBox.cxx.

288{
290 m_points[0*3+0] = dx1; m_points[0*3+1] = dy1; m_points[0*3+2] = -dz;
291 m_points[1*3+0] = -dx1; m_points[1*3+1] = dy1; m_points[1*3+2] = -dz;
292 m_points[2*3+0] = -dx1; m_points[2*3+1] = -dy1; m_points[2*3+2] = -dz;
293 m_points[3*3+0] = dx1; m_points[3*3+1] = -dy1; m_points[3*3+2] = -dz;
294 m_points[4*3+0] = dx2; m_points[4*3+1] = dy2; m_points[4*3+2] = dz;
295 m_points[5*3+0] = -dx2; m_points[5*3+1] = dy2; m_points[5*3+2] = dz;
296 m_points[6*3+0] = -dx2; m_points[6*3+1] = -dy2; m_points[6*3+2] = dz;
297 m_points[7*3+0] = dx2; m_points[7*3+1] = -dy2; m_points[7*3+2] = dz;
299}

◆ setupDefaultPoints()

void SoGenericBox::setupDefaultPoints ( )
private

Definition at line 174 of file SoGenericBox.cxx.

175{
176 setParametersForBox( 0.5, 0.5, 0.5 );
177}
void setParametersForBox(float dx, float dy, float dz, float xcenter=0.0, float ycenter=0.0, float zcenter=0.0)

◆ SO_NODE_HEADER()

SoGenericBox::SO_NODE_HEADER ( SoGenericBox )
private

Member Data Documentation

◆ alternateRep

SoSFNode SoGenericBox::alternateRep

Definition at line 35 of file SoGenericBox.h.

◆ drawEdgeLines

SoSFBool SoGenericBox::drawEdgeLines

Definition at line 33 of file SoGenericBox.h.

◆ forceEdgeLinesInBaseColour

SoSFBool SoGenericBox::forceEdgeLinesInBaseColour

Definition at line 34 of file SoGenericBox.h.

◆ m_bbox

SbBox3f SoGenericBox::m_bbox
private

Definition at line 112 of file SoGenericBox.h.

◆ m_center

SbVec3f SoGenericBox::m_center
private

Definition at line 113 of file SoGenericBox.h.

◆ m_normals

float* SoGenericBox::m_normals
private

Definition at line 111 of file SoGenericBox.h.

◆ m_points

float* SoGenericBox::m_points
private

Definition at line 110 of file SoGenericBox.h.


The documentation for this class was generated from the following files: