Mantid
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
Mantid::Geometry::Surface Class Referenceabstract

Holds a basic quadratic surface. More...

#include <Surface.h>

Inheritance diagram for Mantid::Geometry::Surface:
Mantid::Geometry::Quadratic Mantid::Geometry::Torus Mantid::Geometry::Cone Mantid::Geometry::Cylinder Mantid::Geometry::General Mantid::Geometry::Plane Mantid::Geometry::Sphere

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< Surfaceclone () 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...
 
Surfaceoperator= (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 SurfacedoClone () const =0
 Abstract clone function. More...
 

Private Attributes

int Name
 Surface number (MCNPX identifier) More...
 

Detailed Description

Holds a basic quadratic surface.

Author
S. Ansell
Date
April 2004
Version
1.0

Holds a basic surface with equation form

\[ Ax^2+By^2+Cz^2+Dxy+Exz+Fyz+Gx+Hy+Jz+K=0 \]

Definition at line 33 of file Surface.h.

Constructor & Destructor Documentation

◆ Surface() [1/2]

Mantid::Geometry::Surface::Surface ( const Surface )
protecteddefault

◆ Surface() [2/2]

Mantid::Geometry::Surface::Surface ( )

Constructor.

Definition at line 50 of file Surface.cpp.

◆ ~Surface()

virtual Mantid::Geometry::Surface::~Surface ( )
virtualdefault

Member Function Documentation

◆ acceptVisitor()

virtual void Mantid::Geometry::Surface::acceptVisitor ( BaseVisit A) const
inlinevirtual

◆ className()

virtual std::string Mantid::Geometry::Surface::className ( ) const
inlinevirtual

◆ clone()

std::unique_ptr< Surface > Mantid::Geometry::Surface::clone ( ) const
inline

Definition at line 44 of file Surface.h.

◆ displace()

virtual void Mantid::Geometry::Surface::displace ( const Kernel::V3D )
pure virtual

◆ distance()

virtual double Mantid::Geometry::Surface::distance ( const Kernel::V3D ) const
pure virtual

◆ doClone()

virtual Surface * Mantid::Geometry::Surface::doClone ( ) const
privatepure virtual

◆ getBoundingBox()

virtual void Mantid::Geometry::Surface::getBoundingBox ( double &  xmax,
double &  ymax,
double &  zmax,
double &  xmin,
double &  ymin,
double &  zmin 
)
pure virtual

◆ getName()

int Mantid::Geometry::Surface::getName ( ) const
inline

Get Name.

Definition at line 56 of file Surface.h.

Referenced by Mantid::Geometry::CSGObject::getSurfaceIndex().

◆ onSurface()

virtual bool Mantid::Geometry::Surface::onSurface ( const Kernel::V3D R) const
pure virtual

◆ operator=()

Surface & Mantid::Geometry::Surface::operator= ( const Surface )
delete

◆ print()

void Mantid::Geometry::Surface::print ( ) const
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().

◆ rotate()

virtual void Mantid::Geometry::Surface::rotate ( const Kernel::Matrix< double > &  )
pure virtual

◆ setName()

void Mantid::Geometry::Surface::setName ( int const  N)
inline

Set Name.

Definition at line 55 of file Surface.h.

◆ setSurface()

virtual int Mantid::Geometry::Surface::setSurface ( const std::string &  R)
pure virtual

◆ side()

int Mantid::Geometry::Surface::side ( const Kernel::V3D ) const
virtual

◆ surfaceNormal()

virtual Kernel::V3D Mantid::Geometry::Surface::surfaceNormal ( const Kernel::V3D ) const
pure virtual

returns the normal to the closest point on the surface

Implemented in Mantid::Geometry::Quadratic, and Mantid::Geometry::Torus.

◆ write()

void Mantid::Geometry::Surface::write ( std::ostream &  out) const
virtual

The writes the data to the output stream.

Parameters
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().

◆ writeHeader()

void Mantid::Geometry::Surface::writeHeader ( std::ostream &  OX) const

Writes out the start of an MCNPX surface description .

Does not check the length etc

Parameters
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().

Member Data Documentation

◆ Name

int Mantid::Geometry::Surface::Name
private

Surface number (MCNPX identifier)

Definition at line 35 of file Surface.h.

Referenced by print().

◆ Nprecision

const int Mantid::Geometry::Surface::Nprecision = 10
static

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