source: trunk/source/geometry/solids/CSG/include/G4Orb.hh@ 1058

Last change on this file since 1058 was 1058, checked in by garnier, 17 years ago

file release beta

File size: 4.3 KB
RevLine 
[831]1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
27// $Id: G4Orb.hh,v 1.11 2006/10/19 15:33:37 gcosmo Exp $
[1058]28// GEANT4 tag $Name: geant4-09-02-ref-02 $
[831]29//
30//
31// --------------------------------------------------------------------
32// GEANT 4 class header file
33//
34// G4Orb
35//
36// Class description:
37//
38// A G4Orb is a simple case of G4Sphere. It has only:
39// fRmax outer radius
40
41// History:
42// 20.08.03 V.Grichine - created
43// --------------------------------------------------------------------
44
45#ifndef G4Orb_HH
46#define G4Orb_HH
47
48#include "G4CSGSolid.hh"
49
50class G4Orb : public G4CSGSolid
51{
52 public: // with description
53
54 G4Orb(const G4String& pName, G4double pRmax);
55
56 virtual ~G4Orb() ;
57
58 // Accessors
59
60 inline G4double GetRadius() const;
61
62 // Modifiers
63
64 inline void SetRadius(G4double newRmax);
65
66 // Methods for solid
67
68 inline G4double GetCubicVolume();
69 inline G4double GetSurfaceArea();
70
71 void ComputeDimensions( G4VPVParameterisation* p,
72 const G4int n,
73 const G4VPhysicalVolume* pRep);
74
75 G4bool CalculateExtent(const EAxis pAxis,
76 const G4VoxelLimits& pVoxelLimit,
77 const G4AffineTransform& pTransform,
78 G4double& pmin, G4double& pmax) const;
79
80 EInside Inside(const G4ThreeVector& p) const;
81
82 G4ThreeVector SurfaceNormal( const G4ThreeVector& p) const;
83
84 G4double DistanceToIn(const G4ThreeVector& p,
85 const G4ThreeVector& v) const;
86
87 G4double DistanceToIn(const G4ThreeVector& p) const;
88
89 G4double DistanceToOut(const G4ThreeVector& p,
90 const G4ThreeVector& v,
91 const G4bool calcNorm=G4bool(false),
92 G4bool *validNorm=0,
93 G4ThreeVector *n=0) const;
94
95 G4double DistanceToOut(const G4ThreeVector& p) const;
96
97 G4GeometryType GetEntityType() const;
98
99 G4ThreeVector GetPointOnSurface() const;
100
101 std::ostream& StreamInfo(std::ostream& os) const;
102
103 // Visualisation functions
104
105 void DescribeYourselfTo(G4VGraphicsScene& scene) const;
106 G4Polyhedron* CreatePolyhedron() const;
107 G4NURBS* CreateNURBS() const;
108
109 public: // without description
110
111 G4Orb(__void__&);
112 // Fake default constructor for usage restricted to direct object
113 // persistency for clients requiring preallocation of memory for
114 // persistifiable objects.
115
116 protected:
117
118 // Used by distanceToOut
119
120 enum ESide {kNull,kRMax};
121
122 // used by normal
123
124 enum ENorm {kNRMax};
125
126 private:
127
128 static const G4double fEpsilon;
129 G4double fRmax;
130 G4double fRmaxTolerance;
131};
132
133#include "G4Orb.icc"
134
135#endif
Note: See TracBrowser for help on using the repository browser.