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

#include <G4NURBScylinder.hh>

+ Inheritance diagram for G4NURBScylinder:

Public Member Functions

 G4NURBScylinder (G4double R, 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 G4NURBScylinder.hh.

Constructor & Destructor Documentation

◆ G4NURBScylinder()

G4NURBScylinder::G4NURBScylinder ( G4double  R,
G4double  DZ 
)

Definition at line 40 of file G4NURBScylinder.cc.

41 : G4NURBS ( 2, 3, // linear along U, quadratic along V
42 4, 9, // half rectangle along U, circle along V
43 (new t_CtrlPt [ 4 * 9 ]), // the array for CtrlPts
44 0, // the knot vector along U will be generated
45 (new t_Knot [ 3 + 9 ]) ) // knot vector for the circle
46{
47 // define the V knot vector
48 m[V].pKnots[ 0] = 0;
49 m[V].pKnots[ 1] = 0;
50 m[V].pKnots[ 2] = 0;
51 m[V].pKnots[ 3] = 0.25;
52 m[V].pKnots[ 4] = 0.25;
53 m[V].pKnots[ 5] = 0.5;
54 m[V].pKnots[ 6] = 0.5;
55 m[V].pKnots[ 7] = 0.75;
56 m[V].pKnots[ 8] = 0.75;
57 m[V].pKnots[ 9] = 1;
58 m[V].pKnots[10] = 1;
59 m[V].pKnots[11] = 1;
60
61 // define control points
62
63 const G4double sr2o2 = std::sqrt(2.)/2. ;
64
65 CP(mpCtrlPts[ 0] , 0, 0, DZ, 1 );
66 CP(mpCtrlPts[ 1] , R, 0, DZ, 1 );
67 CP(mpCtrlPts[ 2] , R, 0, -DZ, 1 );
68 CP(mpCtrlPts[ 3] , 0, 0, -DZ, 1 );
69
70 CP(mpCtrlPts[ 4] , 0, 0, DZ, 1 );
71 CP(mpCtrlPts[ 5] , R, R, DZ, 1 , sr2o2);
72 CP(mpCtrlPts[ 6] , R, R,-DZ, 1 , sr2o2);
73 CP(mpCtrlPts[ 7] , 0, 0, -DZ, 1 );
74
75 CP(mpCtrlPts[ 8] , 0, 0, DZ, 1 );
76 CP(mpCtrlPts[ 9] , 0, R, DZ, 1 );
77 CP(mpCtrlPts[10] , 0, R, -DZ, 1 );
78 CP(mpCtrlPts[11] , 0, 0, -DZ, 1 );
79
80 CP(mpCtrlPts[12] , 0, 0, DZ, 1 );
81 CP(mpCtrlPts[13] , -R, R, DZ, 1 , sr2o2);
82 CP(mpCtrlPts[14] , -R, R,-DZ, 1 , sr2o2);
83 CP(mpCtrlPts[15] , 0, 0, -DZ, 1 );
84
85 CP(mpCtrlPts[16] , 0, 0, DZ, 1 );
86 CP(mpCtrlPts[17] , -R, 0, DZ, 1 );
87 CP(mpCtrlPts[18] , -R, 0, -DZ, 1 );
88 CP(mpCtrlPts[19] , 0, 0, -DZ, 1 );
89
90 CP(mpCtrlPts[20] , 0, 0, DZ, 1 );
91 CP(mpCtrlPts[21] , -R,-R, DZ, 1 , sr2o2);
92 CP(mpCtrlPts[22] , -R,-R,-DZ, 1 , sr2o2);
93 CP(mpCtrlPts[23] , 0, 0, -DZ, 1 );
94
95 CP(mpCtrlPts[24] , 0, 0, DZ, 1 );
96 CP(mpCtrlPts[25] , 0, -R, DZ, 1 );
97 CP(mpCtrlPts[26] , 0, -R,-DZ, 1 );
98 CP(mpCtrlPts[27] , 0, 0, -DZ, 1 );
99
100 CP(mpCtrlPts[28] , 0, 0, DZ, 1 );
101 CP(mpCtrlPts[29] , R,-R, DZ, 1 , sr2o2);
102 CP(mpCtrlPts[30] , R,-R,-DZ, 1 , sr2o2);
103 CP(mpCtrlPts[31] , 0, 0, -DZ, 1 );
104
105 CP(mpCtrlPts[32] , 0, 0, DZ, 1 );
106 CP(mpCtrlPts[33] , R, 0, DZ, 1 );
107 CP(mpCtrlPts[34] , R, 0, -DZ, 1 );
108 CP(mpCtrlPts[35] , 0, 0, -DZ, 1 );
109}
double G4double
Definition: G4Types.hh:64
t_Coord t_CtrlPt[NofC]
Definition: G4NURBS.hh:182
t_CtrlPt * mpCtrlPts
Definition: G4NURBS.hh:350
G4Float t_Knot
Definition: G4NURBS.hh:176
static void CP(G4NURBS::t_CtrlPt &rcp, t_Coord x, t_Coord y, t_Coord z, t_Coord w)
Definition: G4NURBS.hh:520
t_Dir m[NofD]
Definition: G4NURBS.hh:348
t_Knot * pKnots
Definition: G4NURBS.hh:275

Member Function Documentation

◆ Whoami()

const char * G4NURBScylinder::Whoami ( ) const
virtual

Implements G4NURBS.

Definition at line 111 of file G4NURBScylinder.cc.

112{
113 return "Cylinder";
114}

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