ATLAS Offline Software
Loading...
Searching...
No Matches
SoLAr.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5/*-----------------------------Hepvis----------------------------------------*/
6/* */
7/* Node: SoLAr */
8/* Description: Represents the G4PCon Geant Geometry entity */
9/* Meant as a replacement to SoPcon */
10/* Author: Joe Boudreau Nov 11 1996 */
11/* */
12/*---------------------------------------------------------------------------*/
13#ifndef HEPVis_SoLAr_h
14#define HEPVis_SoLAr_h
15
16#include <Inventor/C/errors/debugerror.h>
17#include <Inventor/fields/SoSFFloat.h>
18#include <Inventor/fields/SoMFFloat.h>
19#include <Inventor/fields/SoSFInt32.h>
20#include <Inventor/fields/SoSFNode.h>
21#include <Inventor/fields/SoSFBool.h>
22#include <Inventor/nodes/SoShape.h>
23
24#include <memory>
25
26
27class SoSFNode;
29
38
39class SoLAr:public SoShape {
40
41 // The following is required:
43
44public:
45
46 //
48 //
49 SoMFFloat fRmin;
50 //
52 //
53 SoMFFloat fRmax;
54 //
56 //
57 SoMFFloat fDz;
58 //
60 //
61 SoSFFloat fSPhi;
62 //
64 //
65 SoSFFloat fDPhi;
66 //
68 //
69 SoSFBool smoothDraw;
70 //
73 //
74 SoSFInt32 pOverrideNPhi;
75 //
77 //
78 SoSFNode alternateRep;
79
80 //
82 //
83 SoLAr();
84
85 //
87 //
88 static void initClass();
89
90 //
96 //
97 virtual void generateAlternateRep();
98
99 //
101 //
102 virtual void clearAlternateRep();
103
104protected:
105
106 //
108 //
109 virtual void computeBBox(SoAction *action, SbBox3f &box, SbVec3f &center );
110
111 //
113 //
114 virtual void generatePrimitives(SoAction *action);
115
116 //
118 //
119 virtual SoChildList *getChildren() const;
120
121private:
122
123 //
126 //
127 void generateChildren();
128
129 //
132 //
133 void updateChildren();
134
135 //
137 //
138 std::unique_ptr<SoChildList> m_children;
139
140 //
142 //
143 void inc(double & sinPhi, double & cosPhi, double sinDeltaPhi, double cosDeltaPhi) const {
144 double oldSin=sinPhi,oldCos=cosPhi;
145 sinPhi = oldSin*cosDeltaPhi+oldCos*sinDeltaPhi;
146 cosPhi = oldCos*cosDeltaPhi-oldSin*sinDeltaPhi;
147 }
148};
149
150#endif
void updateChildren()
Used to modify hidden children when a data field is changed.
Definition SoLAr.cxx:304
SoSFInt32 pOverrideNPhi
Override number of phi subdivision used for rendering shape (i.e.
Definition SoLAr.h:74
void generateChildren()
Generate Children.
Definition SoLAr.cxx:461
SoLAr()
Constructor, required.
Definition SoLAr.cxx:35
SoSFBool smoothDraw
An Inventor option - slightly better render, worse performance.
Definition SoLAr.h:69
void inc(double &sinPhi, double &cosPhi, double sinDeltaPhi, double cosDeltaPhi) const
help with trigonometry. increments sines an cosines by an angle.
Definition SoLAr.h:143
virtual void clearAlternateRep()
We better be able to clear it, too!
Definition SoLAr.cxx:500
virtual void generatePrimitives(SoAction *action)
Generate Primitives, required.
Definition SoLAr.cxx:72
virtual void computeBBox(SoAction *action, SbBox3f &box, SbVec3f &center)
compute bounding Box, required
Definition SoLAr.cxx:269
SO_NODE_HEADER(SoLAr)
std::unique_ptr< SoChildList > m_children
ChildList. Required whenever the class has hidden children.
Definition SoLAr.h:138
SoMFFloat fDz
Z Positions.
Definition SoLAr.h:57
SoSFFloat fSPhi
Starting angle, in radians.
Definition SoLAr.h:61
virtual SoChildList * getChildren() const
GetChildList, required whenever the class has hidden children.
Definition SoLAr.cxx:263
SoMFFloat fRmin
Inside radii.
Definition SoLAr.h:49
SoSFFloat fDPhi
Delta-angle, in radians.
Definition SoLAr.h:65
virtual void generateAlternateRep()
Generate AlternateRep, required.
Definition SoLAr.cxx:489
SoSFNode alternateRep
Alternate rep required - for use by users without HEPVis shared objects.
Definition SoLAr.h:78
SoMFFloat fRmax
Outside radii.
Definition SoLAr.h:53
static void initClass()
Class Initializer, required.
Definition SoLAr.cxx:62