ATLAS Offline Software
Loading...
Searching...
No Matches
SoPcons.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: SoPcons */
8/* Description: Represents the G4PCon Geant Geometry entity */
9/* Meant as a replacement to SoPcon */
10/* Author: Joe Boudreau Nov 11 1996 */
11/* Update: Giorgi Gvaberidze (ggvaberi@cern.ch) */
12/* April 2011 */
13/* */
14/*---------------------------------------------------------------------------*/
15#ifndef HEPVis_SoPcons_h
16#define HEPVis_SoPcons_h
17
18#include <Inventor/C/errors/debugerror.h>
19#include <Inventor/fields/SoSFFloat.h>
20#include <Inventor/fields/SoMFFloat.h>
21#include <Inventor/fields/SoSFInt32.h>
22#include <Inventor/fields/SoSFNode.h>
23#include <Inventor/fields/SoSFBool.h>
24#include <Inventor/nodes/SoShape.h>
25
26#include <memory>
27
28
29// class SoSFNode;
30
32
41
42class SoPcons:public SoShape {
43
44 // The following is required:
46
47public:
48
49 //
51 //
52 SoMFFloat fRmin;
53 //
55 //
56 SoMFFloat fRmax;
57 //
59 //
60 SoMFFloat fDz;
61 //
63 //
64 SoSFFloat fSPhi;
65 //
67 //
68 SoSFFloat fDPhi;
69 //
71 //
72 SoSFBool smoothDraw;
73 //
76 //
77 SoSFInt32 pOverrideNPhi;
78 //
80 //
81 SoSFNode alternateRep;//FIXED
82
83 SoSFBool drawEdgeLines;//Default: False
84
85 //
87 //
88 SoPcons();
89
90 //
92 //
93 static void initClass();
94
95 //
101 //
102 virtual void generateAlternateRep();//FIXME: NOT IMPLEMENTED
103
104 //
106 //
107 virtual void clearAlternateRep();//FIXME: NOT IMPLEMENTED
108
109protected:
110
111 //
113 //
114 virtual void computeBBox(SoAction *action, SbBox3f &box, SbVec3f &center );
115
116 //
118 //
119 virtual void generatePrimitives(SoAction *action);
120
121 //
123 //
124 virtual SoChildList *getChildren() const;
125
126private:
127
128 //
131 //
132 void generateChildren();
133
134 //
137 //
138 void updateChildren();
139
140 //
142 //
143 std::unique_ptr<SoChildList> m_children;
144
145 //
147 //
148 void inc(double & sinPhi, double & cosPhi, double sinDeltaPhi, double cosDeltaPhi) const {
149 double oldSin=sinPhi,oldCos=cosPhi;
150 sinPhi = oldSin*cosDeltaPhi+oldCos*sinDeltaPhi;
151 cosPhi = oldCos*cosDeltaPhi-oldSin*sinDeltaPhi;
152 }
153};
154
155#endif
SoMFFloat fRmax
Outside radii.
Definition SoPcons.h:56
SoSFFloat fDPhi
Delta-angle, in radians.
Definition SoPcons.h:68
SoSFNode alternateRep
Alternate rep required - for use by users without HEPVis shared objects.
Definition SoPcons.h:81
SoSFFloat fSPhi
Starting angle, in radians.
Definition SoPcons.h:64
SO_NODE_HEADER(SoPcons)
SoSFBool drawEdgeLines
Definition SoPcons.h:83
virtual void clearAlternateRep()
We better be able to clear it, too!
Definition SoPcons.cxx:828
std::unique_ptr< SoChildList > m_children
ChildList. Required whenever the class has hidden children.
Definition SoPcons.h:143
SoPcons()
Constructor, required.
Definition SoPcons.cxx:38
SoMFFloat fRmin
Inside radii.
Definition SoPcons.h:52
virtual void generatePrimitives(SoAction *action)
Generate Primitives, required.
Definition SoPcons.cxx:76
SoSFInt32 pOverrideNPhi
Override number of phi subdivision used for rendering shape (i.e.
Definition SoPcons.h:77
void updateChildren()
Used to modify hidden children when a data field is changed.
Definition SoPcons.cxx:385
static void initClass()
Class Initializer, required.
Definition SoPcons.cxx:67
void inc(double &sinPhi, double &cosPhi, double sinDeltaPhi, double cosDeltaPhi) const
help with trigonometry. increments sines an cosines by an angle.
Definition SoPcons.h:148
virtual void computeBBox(SoAction *action, SbBox3f &box, SbVec3f &center)
compute bounding Box, required
Definition SoPcons.cxx:350
void generateChildren()
Generate Children.
Definition SoPcons.cxx:546
virtual SoChildList * getChildren() const
GetChildList, required whenever the class has hidden children.
Definition SoPcons.cxx:344
SoSFBool smoothDraw
An Inventor option - slightly better render, worse performance.
Definition SoPcons.h:72
SoMFFloat fDz
Z Positions.
Definition SoPcons.h:60
virtual void generateAlternateRep()
Generate AlternateRep, required.
Definition SoPcons.cxx:576