MURE
Loading...
Searching...
No Matches
MathZTorus.hxx
Go to the documentation of this file.
1/*
2 This file is part of MURE,
3 Copyright (C) 2007-2021 MURE developers.
4
5 MURE is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 MURE is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with MURE. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#ifndef _MathZTORUS_
20#define _MathZTORUS_
21
27#include <algorithm>
28#include <vector>
29
30#include "Shape.hxx"
31#include "MathTube.hxx"
32#include "MCSource.hxx"
33
35
46//class MathTube;
47
48class MathZTorus : public Shape
49{
50 public :
56
67 MathZTorus(double TubeR, double TorusR, double Xc = 0, double Yc = 0, double Zc = 0, int Sign = - 1);
68 void Copy(Shape_ptr S) override;
69 Shape_ptr Clone(int count = 0) override;
71
76 unsigned IsZTorus() override
77 {
78 return 1;
79 }
80
81 double GetTubeR()
82 {
83 return fTubeR;
84 }
85 double GetTorusR()
86 {
87 return fTorusR;
88 }
89 double GetX()
90 {
91 return fOrigin[0];
92 }
93 double GetY()
94 {
95 return fOrigin[1];
96 }
97 double GetZ()
98 {
99 return fOrigin[2];
100 }
101 vector < double > GetOrigin()
102 {
103 return fOrigin;
104 }
106
112
118 void Translate(double dx, double dy, double dz, int count = 0) override;
120
128 void Rotate(double phi, double theta = 0, double psi = 0, double *center = nullptr, int count = 0) override;
130
135 unsigned IsIncluded(Shape_ptr OtherShape) override;
136 unsigned IsDisjoint(Shape_ptr OtherShape) override;
138
144
145 double GetVirtualSphereRadius() override;
146 double *GetVirtualSphereCenter() override;
147
149
153 bool PointInShape(double *P, int border) override;
154
155 void CalculNot() override;
156
158
159 protected :
160
161 MathZTorus *CreateNewInstance(int sign = 1) override;
162
163 double fTubeR;
164 double fTorusR;
165 vector < double > fOrigin;
167};
168
169#endif
#define sign(a)
Definition GenericReactorAssembly.cxx:43
Header file for Monte-Carlo Source abstract class.
Header file for MathTube class.
Header file for Shape class and Shape_ptr type.
Define a MathZTorus Shape.
Definition MathZTorus.hxx:49
double GetZ()
Definition MathZTorus.hxx:97
bool PointInShape(double *P, int border) override
true if the point P is in the Shape.
Definition MathZTorus.cxx:202
vector< double > fOrigin
Definition MathZTorus.hxx:165
unsigned IsZTorus() override
Definition MathZTorus.hxx:76
MathZTorus * CreateNewInstance(int sign=1) override
a new MathZTorus instance.
Definition MathZTorus.cxx:239
Shape_ptr fBoundingShape
Definition MathZTorus.hxx:166
double GetX()
Definition MathZTorus.hxx:89
void CalculNot() override
Allocates and calculs the complement of a ZTorus.
Definition MathZTorus.cxx:144
void Copy(Shape_ptr S) override
Copy all attributs of a Shape (but not attributs of the father classes).
Definition MathZTorus.cxx:92
unsigned IsIncluded(Shape_ptr OtherShape) override
return 1 if the ZTorus is included in OtherShape otherwise 0
Definition MathZTorus.cxx:108
double GetVirtualSphereRadius() override
returns the radius of a Sphere containing the Shape
Definition MathZTorus.cxx:223
double fTubeR
Radius of the tube of the torus.
Definition MathZTorus.hxx:163
double GetTubeR()
Definition MathZTorus.hxx:81
void Rotate(double phi, double theta=0, double psi=0, double *center=nullptr, int count=0) override
Rotate the Shape clockwise.
Definition MathZTorus.cxx:187
double fTorusR
Radius of the torus.
Definition MathZTorus.hxx:164
double GetTorusR()
Definition MathZTorus.hxx:85
vector< double > GetOrigin()
Definition MathZTorus.hxx:101
void Translate(double dx, double dy, double dz, int count=0) override
Translate the Node of (dx, dy, dz).
Definition MathZTorus.cxx:168
Shape_ptr GetBoundingShape()
Returns the bounding shape of the hexagon, even if null.
Definition MathZTorus.cxx:194
unsigned IsDisjoint(Shape_ptr OtherShape) override
return 1 if the ZTorus is disjoint of OtherShape otherwise 0
Definition MathZTorus.cxx:129
double * GetVirtualSphereCenter() override
returns the center of a Sphere containing the Shape
Definition MathZTorus.cxx:229
double GetY()
Definition MathZTorus.hxx:93
Shape_ptr Clone(int count=0) override
Clone a Shape.
Definition MathZTorus.cxx:61
Abstract class to define geometrical shapes.
Definition Shape.hxx:85

MURE Project, documentation generated by Doxygen 1.9.7 - Fri Jan 19 2024