Mantid
|
Holds a basic quadratic surface. More...
#include <Surface.h>
Public Member Functions | |
virtual void | acceptVisitor (BaseVisit &A) const |
Accept visitor for line calculation. More... | |
virtual std::string | className () const |
Effective typeid. More... | |
std::unique_ptr< Surface > | clone () const |
virtual void | displace (const Kernel::V3D &)=0 |
translates the surface More... | |
virtual double | distance (const Kernel::V3D &) const =0 |
returns the minimum distance to the surface More... | |
virtual void | getBoundingBox (double &xmax, double &ymax, double &zmax, double &xmin, double &ymin, double &zmin)=0 |
bounding box for the surface More... | |
int | getName () const |
Get Name. More... | |
virtual bool | onSurface (const Kernel::V3D &R) const =0 |
is point valid on surface More... | |
Surface & | operator= (const Surface &)=delete |
virtual void | print () const |
Simple print out function for surface header. More... | |
virtual void | rotate (const Kernel::Matrix< double > &)=0 |
rotates the surface More... | |
void | setName (int const N) |
Set Name. More... | |
virtual int | setSurface (const std::string &R)=0 |
Sets the surface based on a string input in MCNPX format. More... | |
virtual int | side (const Kernel::V3D &) const |
Surface side : throw AbsObjMethod. More... | |
Surface () | |
Constructor. More... | |
virtual Kernel::V3D | surfaceNormal (const Kernel::V3D &) const =0 |
returns the normal to the closest point on the surface More... | |
virtual void | write (std::ostream &) const |
The writes the data to the output stream. More... | |
void | writeHeader (std::ostream &) const |
Writes out the start of an MCNPX surface description . More... | |
virtual | ~Surface ()=default |
Static Public Attributes | |
static const int | Nprecision = 10 |
Precision of the output. More... | |
Protected Member Functions | |
Surface (const Surface &)=default | |
Private Member Functions | |
virtual Surface * | doClone () const =0 |
Abstract clone function. More... | |
Private Attributes | |
int | Name |
Surface number (MCNPX identifier) More... | |
Holds a basic quadratic surface.
Holds a basic surface with equation form
\[ Ax^2+By^2+Cz^2+Dxy+Exz+Fyz+Gx+Hy+Jz+K=0 \]
|
protecteddefault |
Mantid::Geometry::Surface::Surface | ( | ) |
Constructor.
Definition at line 50 of file Surface.cpp.
|
virtualdefault |
|
inlinevirtual |
Accept visitor for line calculation.
Reimplemented in Mantid::Geometry::Cone, Mantid::Geometry::Cylinder, Mantid::Geometry::Plane, Mantid::Geometry::Quadratic, Mantid::Geometry::Sphere, and Mantid::Geometry::Torus.
Definition at line 53 of file Surface.h.
References Mantid::Geometry::BaseVisit::Accept().
|
inlinevirtual |
Effective typeid.
Reimplemented in Mantid::Geometry::Cone, Mantid::Geometry::Cylinder, Mantid::Geometry::Plane, Mantid::Geometry::Quadratic, Mantid::Geometry::Sphere, and Mantid::Geometry::Torus.
|
inline |
|
pure virtual |
translates the surface
Implemented in Mantid::Geometry::Cone, Mantid::Geometry::Cylinder, Mantid::Geometry::Plane, Mantid::Geometry::Quadratic, Mantid::Geometry::Sphere, and Mantid::Geometry::Torus.
|
pure virtual |
returns the minimum distance to the surface
Implemented in Mantid::Geometry::Cone, Mantid::Geometry::Cylinder, Mantid::Geometry::Plane, Mantid::Geometry::Quadratic, Mantid::Geometry::Sphere, and Mantid::Geometry::Torus.
|
privatepure virtual |
Abstract clone function.
Implemented in Mantid::Geometry::Cone, Mantid::Geometry::Cylinder, Mantid::Geometry::General, Mantid::Geometry::Plane, Mantid::Geometry::Sphere, Mantid::Geometry::Torus, and Mantid::Geometry::Quadratic.
|
pure virtual |
bounding box for the surface
Implemented in Mantid::Geometry::Cone, Mantid::Geometry::Cylinder, Mantid::Geometry::General, Mantid::Geometry::Plane, Mantid::Geometry::Sphere, and Mantid::Geometry::Torus.
|
inline |
Get Name.
Definition at line 56 of file Surface.h.
Referenced by Mantid::Geometry::CSGObject::getSurfaceIndex().
|
pure virtual |
is point valid on surface
Implemented in Mantid::Geometry::Cylinder, Mantid::Geometry::Plane, Mantid::Geometry::Quadratic, Mantid::Geometry::Sphere, Mantid::Geometry::Cone, and Mantid::Geometry::Torus.
|
virtual |
Simple print out function for surface header.
Reimplemented in Mantid::Geometry::Cylinder, Mantid::Geometry::Plane, and Mantid::Geometry::Quadratic.
Definition at line 63 of file Surface.cpp.
References Name.
Referenced by Mantid::Geometry::Quadratic::print().
|
pure virtual |
rotates the surface
Implemented in Mantid::Geometry::Cone, Mantid::Geometry::Cylinder, Mantid::Geometry::Plane, Mantid::Geometry::Quadratic, Mantid::Geometry::Sphere, and Mantid::Geometry::Torus.
|
inline |
|
pure virtual |
Sets the surface based on a string input in MCNPX format.
Implemented in Mantid::Geometry::Cone, Mantid::Geometry::Cylinder, Mantid::Geometry::General, Mantid::Geometry::Plane, Mantid::Geometry::Sphere, and Mantid::Geometry::Torus.
|
virtual |
Surface side : throw AbsObjMethod.
Reimplemented in Mantid::Geometry::Cylinder, Mantid::Geometry::Plane, Mantid::Geometry::Quadratic, Mantid::Geometry::Sphere, Mantid::Geometry::Cone, and Mantid::Geometry::Torus.
Definition at line 57 of file Surface.cpp.
|
pure virtual |
returns the normal to the closest point on the surface
Implemented in Mantid::Geometry::Quadratic, and Mantid::Geometry::Torus.
|
virtual |
The writes the data to the output stream.
out | :: The output stream |
Reimplemented in Mantid::Geometry::Cone, Mantid::Geometry::Cylinder, Mantid::Geometry::Plane, Mantid::Geometry::Quadratic, Mantid::Geometry::Sphere, and Mantid::Geometry::Torus.
Definition at line 81 of file Surface.cpp.
Referenced by Mantid::Geometry::Torus::write().
void Mantid::Geometry::Surface::writeHeader | ( | std::ostream & | OX | ) | const |
Writes out the start of an MCNPX surface description .
Does not check the length etc
OX | :: Output stream |
Definition at line 71 of file Surface.cpp.
Referenced by Mantid::Geometry::Cone::write(), Mantid::Geometry::Plane::write(), Mantid::Geometry::Sphere::write(), and Mantid::Geometry::Torus::write().
|
private |
|
static |
Precision of the output.
Definition at line 41 of file Surface.h.
Referenced by Mantid::Geometry::Cone::write(), Mantid::Geometry::Cylinder::write(), Mantid::Geometry::Plane::write(), Mantid::Geometry::Quadratic::write(), Mantid::Geometry::Sphere::write(), and Mantid::Geometry::Torus::write().