MURE
Loading...
Searching...
No Matches
MathPlane.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 _MathPLANE_HXX_
20#define _MathPLANE_HXX_
21
27#include "Shape.hxx"
28#include "MCSource.hxx"
29
31
43class MathPlane : public Shape
44{
45 public :
51
64 MathPlane(double A = 0, double B = 0, double C = 1, double D = 0, int Sign = - 1);
65 Shape_ptr Clone(int count = 0) override;
66 void Copy(Shape_ptr P) override;
68
69
74 unsigned IsPlane() override
75 {
76 return 1;
77 }
78
79 double GetA()
80 {
81 return fA;
82 }
83 double GetB()
84 {
85 return fB;
86 }
87 double GetC()
88 {
89 return fC;
90 }
91 double GetD()
92 {
93 return fD;
94 }
95
100 unsigned IsIncluded(Shape_ptr OtherShape) override;
101 unsigned IsDisjoint(Shape_ptr OtherShape) override;
103
104
110
116 void Translate(double dx, double dy, double dz, int count = 0) override;
118
125 void Rotate(double phi, double theta = 0, double psi = 0, double *center = nullptr, int count = 0) override;
126
128
134
138 bool PointInShape(double *P, int border) override;
139 void CalculNot() override;
141
142 protected :
143
144 MathPlane *CreateNewInstance(int sign = 1) override;
145
146 void Norme();
147
148 double fA;
149 double fB;
150 double fC;
151 double fD;
152};
153
154#endif
#define sign(a)
Definition GenericReactorAssembly.cxx:43
Header file for Monte-Carlo Source abstract class.
Header file for Shape class and Shape_ptr type.
Infinite plane Shape (or half space).
Definition MathPlane.hxx:44
double GetB()
Definition MathPlane.hxx:83
double fB
2nd component of the normal vector
Definition MathPlane.hxx:149
double GetA()
Definition MathPlane.hxx:79
unsigned IsIncluded(Shape_ptr OtherShape) override
return 1 if the Plane is included in OtherShape otherwise 0
Definition MathPlane.cxx:75
double fD
Plane position.
Definition MathPlane.hxx:151
double fC
3th component of the normal vector
Definition MathPlane.hxx:150
Shape_ptr Clone(int count=0) override
Clone a Shape.
Definition MathPlane.cxx:333
MathPlane * CreateNewInstance(int sign=1) override
a new MathPlane instance.
Definition MathPlane.cxx:376
double fA
1st component of the normal vector
Definition MathPlane.hxx:148
double GetD()
Definition MathPlane.hxx:91
double GetC()
Definition MathPlane.hxx:87
unsigned IsPlane() override
Definition MathPlane.hxx:74
bool PointInShape(double *P, int border) override
true if the point P is in the Shape.
Definition MathPlane.cxx:317
void Norme()
Normalisation of Normal vector.
Definition MathPlane.cxx:55
void Copy(Shape_ptr P) override
Copy all attributs of a Shape (but not attributs of the father classes).
Definition MathPlane.cxx:360
void CalculNot() override
Allocates and calculs the complement of a Plane.
Definition MathPlane.cxx:257
unsigned IsDisjoint(Shape_ptr OtherShape) override
return 1 if the Plane is disjoint of OtherShape otherwise 0
Definition MathPlane.cxx:176
void Rotate(double phi, double theta=0, double psi=0, double *center=nullptr, int count=0) override
Rotate the Shape clockwise.
Definition MathPlane.cxx:287
void Translate(double dx, double dy, double dz, int count=0) override
Translate the Node of (dx, dy, dz).
Definition MathPlane.cxx:274
Abstract class to define geometrical shapes.
Definition Shape.hxx:85

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