Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4NURBStube Class Reference

#include <G4NURBStube.hh>

+ Inheritance diagram for G4NURBStube:

Public Member Functions

 G4NURBStube (G4double RMIN, G4double RMAX, G4double DZ)
 
const char * Whoami () const
 
- Public Member Functions inherited from G4NURBS
virtual const char * Whoami () const =0
 
virtual ~G4NURBS ()
 
G4int GetUorder () const
 
G4int GetVorder () const
 
G4int GetUnbrKnots () const
 
G4int GetVnbrKnots () const
 
G4int GetUnbrCtrlPts () const
 
G4int GetVnbrCtrlPts () const
 
G4int GettotalnbrCtrlPts () const
 
G4double GetUmin () const
 
G4double GetUmax () const
 
G4double GetVmin () const
 
G4double GetVmax () const
 
void CalcPoint (G4double u, G4double v, G4Point3D &p, G4Vector3D &utan, G4Vector3D &vtan) const
 
G4int Getorder (t_direction in_dir) const
 
G4int GetnbrKnots (t_direction in_dir) const
 
G4int GetnbrCtrlPts (t_direction in_dir) const
 
G4float GetfloatKnot (t_direction in_dir, t_indKnot in_index) const
 
G4double GetdoubleKnot (t_direction in_dir, t_indKnot in_index) const
 
t_floatCtrlPtGetfloatCtrlPt (t_indCtrlPt in_onedimindex) const
 
t_floatCtrlPtGetfloatCtrlPt (t_inddCtrlPt in_Uindex, t_inddCtrlPt in_Vindex) const
 
t_doubleCtrlPtGetdoubleCtrlPt (t_indCtrlPt in_onedimindex) const
 
t_doubleCtrlPtGetdoubleCtrlPt (t_inddCtrlPt in_Uindex, t_inddCtrlPt in_Vindex) const
 
G4floatGetfloatAllKnots (t_direction in_dir) const
 
G4doubleGetdoubleAllKnots (t_direction in_dir) const
 
G4floatGetfloatAllCtrlPts () const
 
G4doubleGetdoubleAllCtrlPts () const
 
- Public Member Functions inherited from G4Visible
 G4Visible ()
 
 G4Visible (const G4Visible &)
 
 G4Visible (const G4VisAttributes *)
 
virtual ~G4Visible ()
 
G4Visibleoperator= (const G4Visible &)
 
G4bool operator!= (const G4Visible &right) const
 
const G4VisAttributesGetVisAttributes () const
 
void SetVisAttributes (const G4VisAttributes *)
 
void SetVisAttributes (const G4VisAttributes &)
 

Additional Inherited Members

- Public Types inherited from G4NURBS
enum  t_direction { U = 0 , V = 1 , DMask = 1 , NofD = 2 }
 
enum  {
  X , Y , Z , W ,
  NofC
}
 
enum  t_KnotVectorGenFlag { UserDefined , Regular , RegularRep }
 
typedef unsigned int t_index
 
typedef t_index t_indKnot
 
typedef unsigned int t_indCoord
 
typedef unsigned int t_indCtrlPt
 
typedef t_index t_inddCtrlPt
 
typedef G4double t_doubleCtrlPt[NofC]
 
typedef G4float t_floatCtrlPt[NofC]
 
typedef t_index t_order
 
typedef G4Float t_Knot
 
- Static Public Member Functions inherited from G4NURBS
static char Tochar (t_direction in_dir)
 
- Protected Types inherited from G4NURBS
enum  t_CheckFlag { NOcheck , check }
 
typedef Float G4Float
 
typedef G4Float t_Coord
 
typedef t_Coord t_CtrlPt[NofC]
 
- Protected Member Functions inherited from G4NURBS
 G4NURBS (t_order in_Uorder, t_order in_Vorder, t_inddCtrlPt in_UnbrCtrlPts, t_inddCtrlPt in_VnbrCtrlPts, t_CtrlPt *in_pCtrlPts, t_Knot *in_pUKnots=0, t_Knot *in_pVKnots=0, t_CheckFlag in_CheckFlag=check)
 
 G4NURBS (t_order in_Uorder, t_order in_Vorder, t_inddCtrlPt in_UnbrCtrlPts, t_inddCtrlPt in_VnbrCtrlPts, t_KnotVectorGenFlag in_UKVGFlag=Regular, t_KnotVectorGenFlag in_VKVGFlag=Regular, t_CheckFlag in_CheckFlag=check)
 
t_indCtrlPt To1d (t_inddCtrlPt in_Uindex, t_inddCtrlPt in_Vindex) const
 
- Static Protected Member Functions inherited from G4NURBS
static t_floatCtrlPtTofloatCtrlPt (const t_CtrlPt &)
 
static t_doubleCtrlPtTodoubleCtrlPt (const t_CtrlPt &)
 
static G4bool MakeKnotVector (t_Dir &inout_dirdat, t_KnotVectorGenFlag in_KVGFlag)
 
static G4bool MakeKnotVector (t_Dir *p_inoutdirdat, t_KnotVectorGenFlag in_KVGFlag)
 
static void CP (G4NURBS::t_CtrlPt &rcp, t_Coord x, t_Coord y, t_Coord z, t_Coord w)
 
static void CP (G4NURBS::t_CtrlPt &rcp, t_Coord x, t_Coord y, t_Coord z, t_Coord w, G4Float factor)
 
- Protected Attributes inherited from G4NURBS
t_Dir m [NofD]
 
t_indCtrlPt mtotnbrCtrlPts
 
t_CtrlPtmpCtrlPts
 
- Protected Attributes inherited from G4Visible
const G4VisAttributesfpVisAttributes
 
G4bool fAllocatedVisAttributes
 

Detailed Description

Definition at line 44 of file G4NURBStube.hh.

Constructor & Destructor Documentation

◆ G4NURBStube()

G4NURBStube::G4NURBStube ( G4double  RMIN,
G4double  RMAX,
G4double  DZ 
)

Definition at line 37 of file G4NURBStube.cc.

38 : G4NURBS( 2, 3, // linear along U, quadratic along V
39 5, 9, // rectangle along U, circle along V
40 Regular, // the knot vector along U will be generated
41 RegularRep ) // knot vector for the circle also
42{
43 // define control points
44
45 const G4double sr2o2 = std::sqrt(2.)/2.;
46
47 CP(mpCtrlPts[ 0] , r, 0, DZ, 1 );
48 CP(mpCtrlPts[ 1] , R, 0, DZ, 1 );
49 CP(mpCtrlPts[ 2] , R, 0, -DZ, 1 );
50 CP(mpCtrlPts[ 3] , r, 0, -DZ, 1 );
51 CP(mpCtrlPts[ 4] , r, 0, DZ, 1 );
52
53 CP(mpCtrlPts[ 5] , r, r, DZ, 1 , sr2o2);
54 CP(mpCtrlPts[ 6] , R, R, DZ, 1 , sr2o2);
55 CP(mpCtrlPts[ 7] , R, R, -DZ, 1 , sr2o2);
56 CP(mpCtrlPts[ 8] , r, r, -DZ, 1 , sr2o2);
57 CP(mpCtrlPts[ 9] , r, r, DZ, 1 , sr2o2);
58
59 CP(mpCtrlPts[10] , 0, r, DZ, 1 );
60 CP(mpCtrlPts[11] , 0, R, DZ, 1 );
61 CP(mpCtrlPts[12] , 0, R, -DZ, 1 );
62 CP(mpCtrlPts[13] , 0, r, -DZ, 1 );
63 CP(mpCtrlPts[14] , 0, r, DZ, 1 );
64
65 CP(mpCtrlPts[15] , -r, r, DZ, 1 , sr2o2);
66 CP(mpCtrlPts[16] , -R, R, DZ, 1 , sr2o2);
67 CP(mpCtrlPts[17] , -R, R, -DZ, 1 , sr2o2);
68 CP(mpCtrlPts[18] , -r, r, -DZ, 1 , sr2o2);
69 CP(mpCtrlPts[19] , -r, r, DZ, 1 , sr2o2);
70
71 CP(mpCtrlPts[20] , -r, 0, DZ, 1 );
72 CP(mpCtrlPts[21] , -R, 0, DZ, 1 );
73 CP(mpCtrlPts[22] , -R, 0, -DZ, 1 );
74 CP(mpCtrlPts[23] , -r, 0, -DZ, 1 );
75 CP(mpCtrlPts[24] , -r, 0, DZ, 1 );
76
77 CP(mpCtrlPts[25] , -r,-r, DZ, 1 , sr2o2);
78 CP(mpCtrlPts[26] , -R,-R, DZ, 1 , sr2o2);
79 CP(mpCtrlPts[27] , -R,-R, -DZ, 1 , sr2o2);
80 CP(mpCtrlPts[28] , -r,-r, -DZ, 1 , sr2o2);
81 CP(mpCtrlPts[29] , -r,-R, DZ, 1 , sr2o2);
82
83 CP(mpCtrlPts[30] , 0,-r, DZ, 1 );
84 CP(mpCtrlPts[31] , 0,-R, DZ, 1 );
85 CP(mpCtrlPts[32] , 0,-R, -DZ, 1 );
86 CP(mpCtrlPts[33] , 0,-r, -DZ, 1 );
87 CP(mpCtrlPts[34] , 0,-r, DZ, 1 );
88
89 CP(mpCtrlPts[35] , r,-r, DZ, 1 , sr2o2);
90 CP(mpCtrlPts[36] , R,-R, DZ, 1 , sr2o2);
91 CP(mpCtrlPts[37] , R,-R, -DZ, 1 , sr2o2);
92 CP(mpCtrlPts[38] , r,-r, -DZ, 1 , sr2o2);
93 CP(mpCtrlPts[39] , r,-r, DZ, 1 , sr2o2);
94
95 CP(mpCtrlPts[40] , r, 0, DZ, 1 );
96 CP(mpCtrlPts[41] , R, 0, DZ, 1 );
97 CP(mpCtrlPts[42] , R, 0, -DZ, 1 );
98 CP(mpCtrlPts[43] , r, 0, -DZ, 1 );
99 CP(mpCtrlPts[44] , r, 0, DZ, 1 );
100}
double G4double
Definition: G4Types.hh:64
t_CtrlPt * mpCtrlPts
Definition: G4NURBS.hh:350
static void CP(G4NURBS::t_CtrlPt &rcp, t_Coord x, t_Coord y, t_Coord z, t_Coord w)
Definition: G4NURBS.hh:520
@ Regular
Definition: G4NURBS.hh:324
@ RegularRep
Definition: G4NURBS.hh:328

Member Function Documentation

◆ Whoami()

const char * G4NURBStube::Whoami ( ) const
virtual

Implements G4NURBS.

Definition at line 102 of file G4NURBStube.cc.

103{
104 return "Tube";
105}

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