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

#include <G4ProjectedSurface.hh>

+ Inheritance diagram for G4ProjectedSurface:

Public Member Functions

 G4ProjectedSurface ()
 
virtual ~G4ProjectedSurface ()
 
void CalcBBox ()
 
G4Vector3D SurfaceNormal (const G4Point3D &Pt) const
 
- Public Member Functions inherited from G4Surface
 G4Surface ()
 
virtual ~G4Surface ()
 
G4int operator== (const G4Surface &s)
 
virtual G4String GetEntityType () const
 
virtual const char * Name () const
 
virtual G4int MyType () const
 
void SetBoundaries (G4CurveVector *)
 
virtual G4double HowNear (const G4Vector3D &x) const
 
virtual G4double ClosestDistanceToPoint (const G4Point3D &Pt)
 
G4Vector3D GetOrigin () const
 
G4double GetDistance () const
 
void SetDistance (G4double Dist)
 
G4int IsActive () const
 
void SetActive (G4int act)
 
void Deactivate ()
 
void SetSameSense (G4int sameSense0)
 
G4int GetSameSense () const
 
G4BoundingBox3DGetBBox ()
 
const G4Point3DGetClosestHit () const
 
void SetNextNode (G4Surface *)
 
G4SurfaceGetNextNode ()
 
virtual void Reset ()
 
virtual G4int Intersect (const G4Ray &)
 
virtual G4Vector3D Normal (const G4Vector3D &p) const
 
virtual void CalcBBox ()
 
virtual G4double GetUHit () const
 
virtual G4double GetVHit () const
 
virtual G4Point3D Evaluation (const G4Ray &G4Rayref)
 
virtual G4int Evaluate (register const G4Ray &Rayref)
 
virtual void Project ()
 
virtual void CalcNormal ()
 
virtual G4int IsConvex () const
 
virtual G4int GetConvex () const
 
virtual G4int GetNumberOfPoints () const
 
virtual const G4Point3DGetPoint (G4int Count) const
 
virtual G4RayNorm ()
 
virtual G4Vector3D SurfaceNormal (const G4Point3D &Pt) const =0
 
- Public Member Functions inherited from G4STEPEntity
 G4STEPEntity ()
 
virtual ~G4STEPEntity ()
 
virtual G4String GetEntityType () const =0
 

Protected Attributes

G4ControlPointsctl_points
 
- Protected Attributes inherited from G4Surface
G4BoundingBox3Dbbox
 
G4Point3D closest_hit
 
G4Surfacenext
 
G4SurfaceBoundary surfaceBoundary
 
G4double kCarTolerance
 
G4double kAngTolerance
 
G4int Intersected
 
G4Vector3D origin
 
G4int Type
 
G4int AdvancedFace
 
G4int active
 
G4double distance
 
G4double uhit
 
G4double vhit
 
G4int sameSense
 

Static Protected Attributes

static G4int Splits =0
 

Friends

class G4BSplineSurface
 
void CopySurface (G4ProjectedSurface &proj)
 

Additional Inherited Members

- Static Public Member Functions inherited from G4Surface
static void Project (G4double &Coord, const G4Point3D &Pt, const G4Plane &Pl)
 
- Protected Member Functions inherited from G4Surface
virtual void InitBounded ()
 

Detailed Description

Definition at line 44 of file G4ProjectedSurface.hh.

Constructor & Destructor Documentation

◆ G4ProjectedSurface()

G4ProjectedSurface::G4ProjectedSurface ( )

Definition at line 40 of file G4ProjectedSurface.cc.

41 : G4Surface(), ctl_points(0), dir(0), u_knots(0), v_knots(0),
42 projected_list(0), bezier_list(0), new_knots(0), ord(0),
43 lower(0), upper(0), oslo_m(0)
44{
45 distance = 0;
46 order[0] = order[1] = 0;
47}
G4ControlPoints * ctl_points
G4double distance
Definition: G4Surface.hh:203

◆ ~G4ProjectedSurface()

G4ProjectedSurface::~G4ProjectedSurface ( )
virtual

Definition at line 50 of file G4ProjectedSurface.cc.

51{
52 delete u_knots;
53 delete v_knots;
54 delete ctl_points;
55
56 G4OsloMatrix* temp_oslo;
57 if(oslo_m!=(G4OsloMatrix*)0)
58 {
59 while(oslo_m->GetNextNode() != oslo_m)
60 {
61 temp_oslo = oslo_m;
62 oslo_m = oslo_m->GetNextNode();
63
64 delete temp_oslo;
65 }
66
67 delete oslo_m;
68 }
69
70 delete bbox;
71}
G4OsloMatrix * GetNextNode()
G4BoundingBox3D * bbox
Definition: G4Surface.hh:185

Member Function Documentation

◆ CalcBBox()

void G4ProjectedSurface::CalcBBox ( )
virtual

Reimplemented from G4Surface.

Definition at line 100 of file G4ProjectedSurface.cc.

101{
102 // Finds the bounds of the 2D-projected nurb iow
103 // calculates the bounds for a bounding rectangle
104 // to the surface. The bounding rectangle is used
105 // for a preliminary check of intersection.
106
107 // Loop to search the whole control point mesh
108 // for the minimum and maximum values for x and y.
109 G4double box_minx,box_miny,box_maxx,box_maxy;
110 box_minx = kInfinity;
111 box_miny = kInfinity;
112 box_maxx = -kInfinity;
113 box_maxy = -kInfinity;
114
115 G4double bminx,bminy,bmaxx,bmaxy,tmpx,tmpy;
116 bminx = box_minx; bminy = box_miny;
117 bmaxx = box_maxx; bmaxy = box_maxy;
118
119 for(register G4int a = ctl_points->GetRows()-1; a>=0;a--)
120 for(register G4int b = ctl_points->GetCols()-1; b>=0;b--)
121 {
122/* L. Broglia
123 G4Point2d& tmp = (G4Point2d&)ctl_points->get(a,b);
124*/
125 G4Point3D tmp = ctl_points->Get3D(a,b);
126
127 tmpx = tmp.x(); tmpy = tmp.y();
128 if(bminx > tmpx) box_minx=tmpx;
129 if(bmaxx < tmpx) box_maxx=tmpx;
130 if(bminy > tmpy) box_miny=tmpy;
131 if(bmaxy < tmpy) box_maxy=tmpy;
132 }
133
134 G4Point3D box_min(box_minx,box_miny,0.);
135 G4Point3D box_max(box_maxx,box_maxy,0.);
136
137 delete bbox;
138 bbox = new G4BoundingBox3D(box_min, box_max);
139}
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
G4int GetCols() const
G4int GetRows() const
G4Point3D Get3D(G4int i, G4int j) const

◆ SurfaceNormal()

G4Vector3D G4ProjectedSurface::SurfaceNormal ( const G4Point3D Pt) const
inlinevirtual

Implements G4Surface.

Friends And Related Function Documentation

◆ CopySurface

void CopySurface ( G4ProjectedSurface proj)
friend

◆ G4BSplineSurface

friend class G4BSplineSurface
friend

Definition at line 46 of file G4ProjectedSurface.hh.

Member Data Documentation

◆ ctl_points

G4ControlPoints* G4ProjectedSurface::ctl_points
protected

Definition at line 110 of file G4ProjectedSurface.hh.

Referenced by CalcBBox(), and ~G4ProjectedSurface().

◆ Splits

G4int G4ProjectedSurface::Splits =0
staticprotected

Definition at line 109 of file G4ProjectedSurface.hh.


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