Mantid
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
Mantid::Kernel::V3D Class Referencefinal

Class for 3D vectors. More...

#include <Kernel\V3D.h>

Public Member Functions

V3D absoluteValue () const
 Absolute value. More...
 
double angle (const V3D &) const
 Angle between this and another vector. More...
 
void azimuth_polar_SNS (const double R, const double azimuth, const double polar) noexcept
 Sets the vector position based on azimuth and polar angle, in RADIANS, in the SNS instrument coordinate system, where +Z = beam direction, +Y = vertical. More...
 
bool coLinear (const V3D &, const V3D &) const noexcept
 Determines if this,B,C are colinear. More...
 
double cosAngle (const V3D &) const
 cos(Angle) between this and another vector More...
 
constexpr V3D cross_prod (const V3D &v) const noexcept
 Cross product (this * argument) More...
 
V3D directionAngles (bool inDegrees=true) const
 Direction angles. More...
 
double distance (const V3D &v) const noexcept
 Calculates the distance between two vectors. More...
 
void fromString (const std::string &str)
 Sets the vector using a string. More...
 
void getSpherical (double &R, double &theta, double &phi) const noexcept
 Return the vector's position in spherical coordinates. More...
 
double hklError () const
 Calculates the error in hkl. More...
 
void loadNexus (::NeXus::File *file, const std::string &name)
 Load the object from an open NeXus file. More...
 
int masterDir (const double Tol=1e-3) const noexcept
 Determine if there is a master direction. More...
 
int maxCoeff ()
 Maximum absolute integer value. More...
 
double norm () const noexcept
 
constexpr double norm2 () const noexcept
 Vector length squared. More...
 
double normalize ()
 Make a normalized vector (return norm value) More...
 
bool nullVector (const double tolerance=1e-3) const noexcept
 Determine if the point is null. More...
 
 operator std::vector< double > () const
 
bool operator!= (const V3D &other) const noexcept
 Not equals operator with tolerance factor. More...
 
void operator() (const double xx, const double yy, const double zz) noexcept
 Sets the vector position from a triplet of doubles x,y,z. More...
 
constexpr V3D operator* (const double D) const noexcept
 Scalar product. More...
 
constexpr V3D operator* (const V3D &v) const noexcept
 Inner product. More...
 
V3Doperator*= (const double D) noexcept
 Scalar product. More...
 
V3Doperator*= (const V3D &v) noexcept
 Self-Inner product. More...
 
constexpr V3D operator+ (const V3D &v) const noexcept
 Addtion operator. More...
 
V3Doperator+= (const V3D &v) noexcept
 Self-Addition operator. More...
 
constexpr V3D operator- () const noexcept
 Negation. More...
 
constexpr V3D operator- (const V3D &v) const noexcept
 Subtraction operator. More...
 
V3Doperator-= (const V3D &v) noexcept
 Self-Subtraction operator. More...
 
constexpr V3D operator/ (const double D) const noexcept
 Scalar divsion. More...
 
constexpr V3D operator/ (const V3D &v) const noexcept
 Inner division. More...
 
V3Doperator/= (const double D) noexcept
 Scalar division. More...
 
V3Doperator/= (const V3D &v) noexcept
 Self-Inner division. More...
 
constexpr bool operator< (const V3D &V) const noexcept
 compare More...
 
bool operator== (const V3D &v) const noexcept
 Equals operator with tolerance factor. More...
 
constexpr bool operator> (const V3D &rhs) const noexcept
 Comparison operator greater than. More...
 
constexpr double operator[] (const size_t index) const noexcept
 Returns the axis value based in the index provided. More...
 
double & operator[] (const size_t index) noexcept
 Returns the axis value based in the index provided. More...
 
void printSelf (std::ostream &) const
 Prints a text representation of itself in format "[x,y,z]". More...
 
void read (std::istream &)
 Read data from a stream. More...
 
void readPrinted (std::istream &)
 Read data from a stream in the format returned by printSelf ("[x,y,z]"). More...
 
int reBase (const V3D &, const V3D &, const V3D &) noexcept
 rebase to new basis vector More...
 
void rotate (const Matrix< double > &) noexcept
 Rotate a point by a matrix. More...
 
void round () noexcept
 Round each component to the nearest integer. More...
 
void saveNexus (::NeXus::File *file, const std::string &name) const
 Save the object to an open NeXus file. More...
 
constexpr double scalar_prod (const V3D &v) const noexcept
 Calculates the cross product. More...
 
void setX (const double xx) noexcept
 Set is x position. More...
 
void setY (const double yy) noexcept
 Set is y position. More...
 
void setZ (const double zz) noexcept
 Set is z position. More...
 
void spherical (const double R, const double theta, const double phi) noexcept
 Sets the vector position based on spherical coordinates. More...
 
void spherical_rad (const double R, const double polar, const double azimuth) noexcept
 Sets the vector position based on spherical coordinates, in radians. More...
 
double toMillerIndexes (double eps=1.e-3)
 transform vector into form, used to describe directions in crystallogaphical coodinate system More...
 
std::string toString () const
 
bool unitVector (const double tolerance=Kernel::Tolerance) const noexcept
 
constexpr V3D () noexcept
 
constexpr V3D (double xx, double yy, double zz) noexcept
 
double volume () const noexcept
 Calculate the volume of a cube X*Y*Z. More...
 
void write (std::ostream &) const
 Write out the point values. More...
 
constexpr double X () const noexcept
 Get x. More...
 
constexpr double Y () const noexcept
 Get y. More...
 
constexpr double Z () const noexcept
 Get z. More...
 
double zenith (const V3D &) const noexcept
 Zenith (theta) angle between this and another vector. More...
 

Static Public Member Functions

static bool compareMagnitude (const Kernel::V3D &v1, const Kernel::V3D &v2)
 Convenience method for sorting list of V3D objects based on magnitude. More...
 
static std::vector< V3DmakeVectorsOrthogonal (const std::vector< V3D > &vectors)
 Take a list of 2 vectors and makes a 3D orthogonal system out of them The first vector i0 is taken as such. More...
 

Private Attributes

std::array< double, 3 > m_pt
 

Detailed Description

Class for 3D vectors.

Author
Laurent C Chapon, ISIS, RAL
Date
09/10/2007

Definition at line 34 of file V3D.h.

Constructor & Destructor Documentation

◆ V3D() [1/2]

constexpr Mantid::Kernel::V3D::V3D ( )
inlineconstexprnoexcept

Definition at line 36 of file V3D.h.

Referenced by absoluteValue(), and directionAngles().

◆ V3D() [2/2]

constexpr Mantid::Kernel::V3D::V3D ( double  xx,
double  yy,
double  zz 
)
inlineconstexprnoexcept

Definition at line 37 of file V3D.h.

Member Function Documentation

◆ absoluteValue()

V3D Mantid::Kernel::V3D::absoluteValue ( ) const

Absolute value.

Calculates the absolute value.

Returns
The absolute value

Definition at line 524 of file V3D.cpp.

References fabs, m_pt, and V3D().

Referenced by Mantid::Crystal::FindUBUsingIndexedPeaks::exec().

◆ angle()

double Mantid::Kernel::V3D::angle ( const V3D v) const

Angle between this and another vector.

Calculates the angle between this and another vector.

Parameters
v:: The other vector
Returns
The angle between the vectors in radians (0 < theta < pi)

Definition at line 165 of file V3D.cpp.

References cosAngle().

Referenced by Mantid::MDAlgorithms::calculate2Theta(), Mantid::CurveFitting::Algorithms::VesuvioCalculateMS::calculateCounts(), Mantid::DataHandling::LoadILLDiffraction::calculateRelativeRotations(), Mantid::Geometry::IndexingUtils::DiscardDuplicates(), Mantid::DataHandling::LoadIsawDetCal::doRotation(), Mantid::Algorithms::HRPDSlabCanAbsorption::exec(), Mantid::Crystal::LoadIsawSpectrum::exec(), export_V3D(), Mantid::Geometry::IndexingUtils::FormUB_From_abc_Vectors(), Mantid::CurveFitting::Algorithms::VesuvioCalculateMS::generateDetectorPos(), Mantid::MDAlgorithms::GetSpiceDataRawCountsFromMD::getDetCounts(), Mantid::Geometry::GetDiffFrom90Sum(), Mantid::DataObjects::Peak::getDSpacing(), Mantid::Geometry::ScalarUtils::GetRelatedUBs(), Mantid::DataObjects::Peak::getScattering(), Mantid::Geometry::Detector::getSignedTwoTheta(), Mantid::Geometry::DetectorGroup::getSignedTwoTheta(), Mantid::Geometry::Detector::getTwoTheta(), Mantid::Geometry::DetectorGroup::getTwoTheta(), Mantid::Geometry::NiggliCell::HasNiggliAngles(), Mantid::Geometry::InstrumentDefinitionParser::makeXYplaneFaceComponent(), Mantid::Kernel::Quat::operator()(), Mantid::Geometry::ConventionalCell::StandardizeHexagonal(), and Mantid::Algorithms::MCInteractionStatistics::UpdateScatterAngleStats().

◆ azimuth_polar_SNS()

void Mantid::Kernel::V3D::azimuth_polar_SNS ( const double  R,
const double  azimuth,
const double  polar 
)
noexcept

Sets the vector position based on azimuth and polar angle, in RADIANS, in the SNS instrument coordinate system, where +Z = beam direction, +Y = vertical.

Parameters
R:: The R value (distance)
azimuth:: The azimuthal angle (in Radians)
polar:: The polar value (in Radians)

Definition at line 95 of file V3D.cpp.

References Mantid::Kernel::Tolerance.

Referenced by Mantid::CurveFitting::Algorithms::VesuvioCalculateMS::calculateCounts().

◆ coLinear()

bool Mantid::Kernel::V3D::coLinear ( const V3D Bv,
const V3D Cv 
) const
noexcept

Determines if this,B,C are colinear.

Parameters
Bv:: Vector to test
Cv:: Vector to test
Returns
false if no colinear and true if they are (within Tolerance)

Definition at line 230 of file V3D.cpp.

References norm(), and Mantid::Kernel::Tolerance.

Referenced by Mantid::Crystal::CalculateUMatrix::exec().

◆ compareMagnitude()

bool Mantid::Kernel::V3D::compareMagnitude ( const Kernel::V3D v1,
const Kernel::V3D v2 
)
static

Convenience method for sorting list of V3D objects based on magnitude.

Comparator function for sorting list of 3D vectors based on their magnitude.

Parameters
v1first vector
v2seconde vector
Returns
true if v1.norm() < v2.norm().

Definition at line 483 of file V3D.cpp.

Referenced by Mantid::Geometry::IndexingUtils::FFTScanFor_Directions(), Mantid::Geometry::IndexingUtils::Find_UB(), Mantid::Geometry::NiggliCell::MakeNiggliUB(), and Mantid::Geometry::ConventionalCell::SetSidesIncreasing().

◆ cosAngle()

double Mantid::Kernel::V3D::cosAngle ( const V3D v) const

cos(Angle) between this and another vector

Calculates the cosine of angle between this and another vector.

Parameters
v:: The other vector
Returns
cosine of the angle between the vectors

Definition at line 180 of file V3D.cpp.

References norm(), and scalar_prod().

Referenced by angle(), export_V3D(), Mantid::DataObjects::Peak::findDetector(), Mantid::Algorithms::SolidAngleHelpers::Rectangle::solidAngle(), and Mantid::Algorithms::SolidAngleHelpers::Wing::solidAngle().

◆ cross_prod()

constexpr V3D Mantid::Kernel::V3D::cross_prod ( const V3D v) const
inlineconstexprnoexcept

◆ directionAngles()

V3D Mantid::Kernel::V3D::directionAngles ( bool  inDegrees = true) const

Direction angles.

Get direction angles from direction cosines.

Parameters
inDegrees: optional argument for specifying in radians (false). Defaults to true.
Returns
V3D containing anlges.

Definition at line 495 of file V3D.cpp.

References m_pt, norm(), and V3D().

Referenced by export_V3D().

◆ distance()

double Mantid::Kernel::V3D::distance ( const V3D v) const
inlinenoexcept

◆ fromString()

void Mantid::Kernel::V3D::fromString ( const std::string &  str)

Sets the vector using a string.

Parameters
str:: the vector as a string "X Y Z"

Definition at line 348 of file V3D.cpp.

References read().

Referenced by Mantid::Geometry::ComponentParser::endElement().

◆ getSpherical()

void Mantid::Kernel::V3D::getSpherical ( double &  R,
double &  theta,
double &  phi 
) const
noexcept

◆ hklError()

double Mantid::Kernel::V3D::hklError ( ) const

Calculates the error in hkl.

Calculates the error of the HKL to compare with tolerance.

Returns
The error

Definition at line 530 of file V3D.cpp.

References fabs, and m_pt.

Referenced by Mantid::Geometry::IndexingUtils::CalculateMillerIndices().

◆ loadNexus()

void Mantid::Kernel::V3D::loadNexus ( ::NeXus::File *  file,
const std::string &  name 
)

Load the object from an open NeXus file.

Parameters
file:: open NeXus file
name:: name of the data to open

Definition at line 423 of file V3D.cpp.

References m_pt.

Referenced by Mantid::Geometry::GoniometerAxis::loadNexus().

◆ makeVectorsOrthogonal()

std::vector< V3D > Mantid::Kernel::V3D::makeVectorsOrthogonal ( const std::vector< V3D > &  vectors)
static

Take a list of 2 vectors and makes a 3D orthogonal system out of them The first vector i0 is taken as such.

The second vector is made perpendicular to i0, in the plane of i0-i1 The third vector is made perpendicular to the plane i0-i1 by performing the cross product of 0 and 1

Parameters
vectors:: list of 2 vectors
Returns
list of 3 vectors

Definition at line 298 of file V3D.cpp.

References cross_prod(), Mantid::Kernel::normalize(), Mantid::Kernel::Quat::rotate(), and Mantid::Kernel::Quat::setRotation().

Referenced by Mantid::MDAlgorithms::MDWSTransform::buildQTrahsf(), Mantid::Kernel::VMDBase< TYPE >::makeVectorsOrthogonal(), and Mantid::MDAlgorithms::MDWSTransform::setQ3DDimensionsNames().

◆ masterDir()

int Mantid::Kernel::V3D::masterDir ( const double  tolerance = 1e-3) const
noexcept

Determine if there is a master direction.

Calculates the index of the primary direction (if there is one)

Parameters
tolerance:: Tolerance accepted
Return values
range-3,-2,-1 1,2,3 if the vector is orientaged within tolerance on the x,y,z direction (the sign indecates the direction to the +ve side )
0:: No master direction

Definition at line 264 of file V3D.cpp.

References tolerance.

◆ maxCoeff()

int Mantid::Kernel::V3D::maxCoeff ( )

Maximum absolute integer value.

Vector maximum absolute integer value.

Returns
maxCoeff()

Definition at line 509 of file V3D.cpp.

References m_pt.

Referenced by Mantid::Crystal::FindUBUsingIndexedPeaks::exec().

◆ norm()

double Mantid::Kernel::V3D::norm ( ) const
inlinenoexcept

Definition at line 263 of file V3D.h.

Referenced by Mantid::Geometry::CoplanarChecks::allCoplanar(), Mantid::Geometry::BoundingBox::angularWidth(), Mantid::DataHandling::LoadStl::areEqualVertices(), Mantid::API::WorkspaceNearestNeighbours::build(), Mantid::Algorithms::GravitySANSHelper::calcSinTheta(), Mantid::Algorithms::AbsorptionCorrection::calculateDistances(), Mantid::Algorithms::PaalmanPingsAbsorptionCorrection::calculateDistances(), Mantid::MDAlgorithms::IntegratePeaksMD2::calculateDistanceToEdge(), Mantid::Algorithms::MultipleScatteringCorrection::calculateL2Ds(), Mantid::DataHandling::LoadDspacemap::CalculateOffsetsFromVulcanFactors(), Mantid::Crystal::IntegratePeakTimeSlices::CalculatePositionSpan(), Mantid::Crystal::IntegratePeakTimeSlices::CalculateTimeChannelSpan(), Mantid::DataObjects::BasePeak::calculateWavelengthFromQLab(), Mantid::Geometry::Sphere::centreToPoint(), coLinear(), Mantid::Geometry::CompareABCsum(), Mantid::MDAlgorithms::ConvertToDiffractionMDWorkspace::convertEventList(), Mantid::API::DetectorSearcher::convertQtoDirection(), Mantid::MDAlgorithms::ConvertCWSDExpToMomentum::convertSpiceMatrixToMomentumMDEvents(), cosAngle(), Mantid::MDAlgorithms::Integrate3DEvents::detectorQ(), Mantid::MDAlgorithms::IntegrateQLabEvents::detectorQ(), directionAngles(), Mantid::Geometry::IndexingUtils::DiscardDuplicates(), Mantid::Geometry::Cone::distance(), Mantid::Geometry::Sphere::distance(), Mantid::Geometry::Torus::distance(), Mantid::Algorithms::CompareWorkspaces::doLeanElasticPeaksComparison(), Mantid::Geometry::UnitCell::dstar(), Mantid::Algorithms::DiffractionEventCalibrateDetectors::exec(), Mantid::Algorithms::TOFSANSResolutionByPixel::exec(), Mantid::Crystal::LoadIsawSpectrum::exec(), Mantid::Crystal::SetGoniometer::exec(), Mantid::MDAlgorithms::ConvertToDiffractionMDWorkspace::exec(), Mantid::MDAlgorithms::IntegrateEllipsoidsV1::exec(), Mantid::MDAlgorithms::IntegrateEllipsoidsV2::exec(), export_V3D(), Mantid::Geometry::IndexingUtils::FFTScanFor_Directions(), Mantid::MDAlgorithms::IntegratePeaksMD2::findEllipsoid(), Mantid::Crystal::PeakHKLErrors::functionDeriv1D(), Mantid::DataObjects::LeanElasticPeak::getDSpacing(), Mantid::Geometry::IndexingUtils::GetIndexedPeaks_1D(), Mantid::Geometry::Instrument::getInstrumentParameters(), Mantid::Algorithms::RadiusSum::getMinBinSizeForInstrument(), Mantid::Crystal::PredictPeaks::getPeakParametersFromQ(), Mantid::MDAlgorithms::IntegratePeaksMD2::getPinv(), Mantid::DataObjects::Peak::getQLabFrame(), Mantid::Geometry::ScalarUtils::GetRelatedUBs(), Mantid::Geometry::MeshObjectCommon::getTriangleSolidAngle(), Mantid::Geometry::MeshObject2D::initialize(), Mantid::Crystal::lineIntersectsSphere(), Mantid::MDAlgorithms::IntegrateEllipsoidsTwoStep::makeIntegrationParameters(), Mantid::Geometry::NiggliCell::MakeNiggliUB(), Mantid::Geometry::InstrumentDefinitionParser::makeXYplaneFaceComponent(), normalize(), Mantid::Geometry::IndexingUtils::NumberIndexed_1D(), Mantid::Geometry::IndexingUtils::NumberIndexed_3D(), Mantid::DataHandling::V3DTrueComparator::operator()(), Mantid::DataObjects::PeaksWorkspace::peakInfo(), Mantid::DataObjects::PeaksWorkspace::peakInfoNumber(), Mantid::DataHandling::SetScalingPSD::processScalingFile(), Mantid::Algorithms::SANSCollimationLengthEstimator::provideCollimationLength(), Mantid::Geometry::CSGObject::rayTraceSolidAngle(), Mantid::Geometry::IndexingUtils::ScanFor_Directions(), Mantid::Algorithms::DiscusMultipleScatteringCorrection::scatter(), Mantid::Geometry::Cone::setNorm(), Mantid::Geometry::Torus::setNorm(), Mantid::DataObjects::Peak::setQLabFrame(), Mantid::Geometry::OrientedLattice::setUFromVectors(), Mantid::Geometry::ConventionalCell::StandardizeTetragonal(), Mantid::Algorithms::SmoothNeighbours::translateToMeters(), Mantid::Algorithms::LinearWeighting::weightAt(), and Mantid::Algorithms::GaussianWeightingnD::weightAt().

◆ norm2()

constexpr double Mantid::Kernel::V3D::norm2 ( ) const
inlineconstexprnoexcept

◆ normalize()

double Mantid::Kernel::V3D::normalize ( )

Make a normalized vector (return norm value)

Normalises the vector and returns its original length.

Returns
the norm of the vector before normalization

Definition at line 130 of file V3D.cpp.

References norm(), and operator/=().

Referenced by Mantid::DataHandling::AvrgDetector::addDetInfo(), Mantid::CurveFitting::Algorithms::VesuvioCalculateMS::cacheInputs(), Mantid::Algorithms::He3TubeEfficiency::calculateExponential(), Mantid::Algorithms::DetectorEfficiencyCor::correctForEfficiency(), Mantid::Geometry::ShapeFactory::createGeometryHandler(), Mantid::DataHandling::LoadIsawDetCal::doRotation(), Mantid::Algorithms::DiffractionEventCalibrateDetectors::exec(), Mantid::Algorithms::RayTracerTester::exec(), Mantid::Crystal::GoniometerAnglesFromPhiRotation::exec(), Mantid::Crystal::SaveHKL::exec(), Mantid::Crystal::SaveIsawPeaks::exec(), Mantid::DataHandling::SaveIsawDetCal::exec(), Mantid::Crystal::IntegratePeakTimeSlices::FindPlane(), Mantid::Crystal::PredictPeaks::getPeakParametersFromQ(), Mantid::Geometry::CSGObject::isOnSide(), Mantid::Geometry::RandomPoint::localPointInCylinder(), Mantid::Geometry::IndexingUtils::MakeCircleDirections(), Mantid::Kernel::normalize(), Mantid::Geometry::Line::rotate(), Mantid::Geometry::Cylinder::rotate(), Mantid::Geometry::Plane::rotate(), Mantid::Algorithms::DiscusMultipleScatteringCorrection::scatter(), Mantid::Geometry::IndexingUtils::SelectDirection(), Mantid::DataObjects::Peak::setQLabFrame(), Mantid::Geometry::Plane::setSurface(), Mantid::Geometry::OrientedLattice::setUFromVectors(), and Mantid::Geometry::Quadratic::surfaceNormal().

◆ nullVector()

bool Mantid::Kernel::V3D::nullVector ( const double  tolerance = 1e-3) const
noexcept

◆ operator std::vector< double >()

Mantid::Kernel::V3D::operator std::vector< double > ( ) const
inline

Definition at line 43 of file V3D.h.

◆ operator!=()

bool Mantid::Kernel::V3D::operator!= ( const V3D other) const
inlinenoexcept

Not equals operator with tolerance factor.

Parameters
other:: The V3D to compare against
Returns
True if the vectors are different

Definition at line 184 of file V3D.h.

References std::operator==().

◆ operator()()

void Mantid::Kernel::V3D::operator() ( const double  xx,
const double  yy,
const double  zz 
)
inlinenoexcept

Sets the vector position from a triplet of doubles x,y,z.

Parameters
xx:: The X coordinate
yy:: The Y coordinate
zz:: The Z coordinate

Definition at line 207 of file V3D.h.

◆ operator*() [1/2]

constexpr V3D Mantid::Kernel::V3D::operator* ( const double  D) const
inlineconstexprnoexcept

Scalar product.

Parameters
D:: value to scale
Returns
this * D

Definition at line 134 of file V3D.h.

◆ operator*() [2/2]

constexpr V3D Mantid::Kernel::V3D::operator* ( const V3D v) const
inlineconstexprnoexcept

Inner product.

Parameters
v:: Vector to sub.
Returns
*this * v;

Definition at line 68 of file V3D.h.

◆ operator*=() [1/2]

V3D & Mantid::Kernel::V3D::operator*= ( const double  D)
inlinenoexcept

Scalar product.

Parameters
D:: value to scale
Returns
this *= D

Definition at line 148 of file V3D.h.

◆ operator*=() [2/2]

V3D & Mantid::Kernel::V3D::operator*= ( const V3D v)
inlinenoexcept

Self-Inner product.

Parameters
v:: Vector to multiply
Returns
this=v;

Definition at line 110 of file V3D.h.

References m_pt.

Referenced by toMillerIndexes().

◆ operator+()

constexpr V3D Mantid::Kernel::V3D::operator+ ( const V3D v) const
inlineconstexprnoexcept

Addtion operator.

Parameters
v:: Vector to add
Returns
*this+v;

Definition at line 50 of file V3D.h.

◆ operator+=()

V3D & Mantid::Kernel::V3D::operator+= ( const V3D v)
inlinenoexcept

Self-Addition operator.

Parameters
v:: Vector to add.
Returns
*this+=v;

Definition at line 86 of file V3D.h.

References m_pt.

◆ operator-() [1/2]

constexpr V3D Mantid::Kernel::V3D::operator- ( ) const
inlineconstexprnoexcept

Negation.

Returns
a vector with same magnitude but in opposite direction

Definition at line 168 of file V3D.h.

◆ operator-() [2/2]

constexpr V3D Mantid::Kernel::V3D::operator- ( const V3D v) const
inlineconstexprnoexcept

Subtraction operator.

Parameters
v:: Vector to sub.
Returns
*this-v;

Definition at line 59 of file V3D.h.

◆ operator-=()

V3D & Mantid::Kernel::V3D::operator-= ( const V3D v)
inlinenoexcept

Self-Subtraction operator.

Parameters
v:: Vector to sub.
Returns
*this-v;

Definition at line 98 of file V3D.h.

References m_pt.

◆ operator/() [1/2]

constexpr V3D Mantid::Kernel::V3D::operator/ ( const double  D) const
inlineconstexprnoexcept

Scalar divsion.

Parameters
D:: value to scale
Returns
this / D

Definition at line 141 of file V3D.h.

◆ operator/() [2/2]

constexpr V3D Mantid::Kernel::V3D::operator/ ( const V3D v) const
inlineconstexprnoexcept

Inner division.

Parameters
v:: Vector to divide
Returns
*this * v;

Definition at line 77 of file V3D.h.

◆ operator/=() [1/2]

V3D & Mantid::Kernel::V3D::operator/= ( const double  D)
inlinenoexcept

Scalar division.

Parameters
D:: value to scale
Returns
this /= D
Todo:
ADD TOLERANCE

Definition at line 159 of file V3D.h.

◆ operator/=() [2/2]

V3D & Mantid::Kernel::V3D::operator/= ( const V3D v)
inlinenoexcept

Self-Inner division.

Parameters
v:: Vector to divide
Returns
this=v;

Definition at line 122 of file V3D.h.

References m_pt.

Referenced by normalize().

◆ operator<()

constexpr bool Mantid::Kernel::V3D::operator< ( const V3D V) const
inlineconstexprnoexcept

compare

Returns
true if V is greater

Definition at line 190 of file V3D.h.

◆ operator==()

bool Mantid::Kernel::V3D::operator== ( const V3D v) const
inlinenoexcept

Equals operator with tolerance factor.

Parameters
v:: V3D for comparison
Returns
true if the items are equal

Definition at line 175 of file V3D.h.

References Mantid::Kernel::Tolerance.

◆ operator>()

constexpr bool Mantid::Kernel::V3D::operator> ( const V3D rhs) const
inlineconstexprnoexcept

Comparison operator greater than.

Definition at line 199 of file V3D.h.

References rhs.

◆ operator[]() [1/2]

constexpr double Mantid::Kernel::V3D::operator[] ( const size_t  index) const
inlineconstexprnoexcept

Returns the axis value based in the index provided.

Parameters
index:: 0=x, 1=y, 2=z
Returns
a double value of the requested axis

Definition at line 241 of file V3D.h.

References index.

◆ operator[]() [2/2]

double & Mantid::Kernel::V3D::operator[] ( const size_t  index)
inlinenoexcept

Returns the axis value based in the index provided.

Parameters
index:: 0=x, 1=y, 2=z
Returns
a double value of the requested axis

Definition at line 251 of file V3D.h.

References index.

◆ printSelf()

void Mantid::Kernel::V3D::printSelf ( std::ostream &  os) const

Prints a text representation of itself in format "[x,y,z]".

Parameters
os:: the Stream to output to

Definition at line 357 of file V3D.cpp.

References m_pt.

Referenced by Mantid::MDAlgorithms::IntegratePeaksMD2::calcCovar(), and Mantid::Kernel::operator<<().

◆ read()

void Mantid::Kernel::V3D::read ( std::istream &  IX)

Read data from a stream.

Todo:
Check Error handling
Parameters
IX:: Input Stream

Definition at line 328 of file V3D.cpp.

References m_pt.

Referenced by fromString().

◆ readPrinted()

void Mantid::Kernel::V3D::readPrinted ( std::istream &  IX)

Read data from a stream in the format returned by printSelf ("[x,y,z]").

Parameters
IX:: Input Stream
Exceptions
std::runtime_errorif the input is of wrong format

Definition at line 364 of file V3D.cpp.

References m_pt.

Referenced by Mantid::DataHandling::SaveParameterFile::exec(), Mantid::Kernel::operator>>(), and Mantid::DataHandling::LoadAscii2::readTable().

◆ reBase()

int Mantid::Kernel::V3D::reBase ( const V3D A,
const V3D B,
const V3D C 
)
noexcept

rebase to new basis vector

Re-express this point as components of A,B,C.

Assuming that A,B,C form a basis set (which does not have to be orthonormal).

Parameters
A:: Unit vector in basis
B:: Unit vector in basis
C:: Unit vector in basis
Return values
-1:: The points do not form a basis set.
0:: Vec3D has successfully been re-expressed.

Definition at line 199 of file V3D.cpp.

References Mantid::Kernel::Matrix< T >::Invert().

◆ rotate()

void Mantid::Kernel::V3D::rotate ( const Matrix< double > &  A)
noexcept

◆ round()

void Mantid::Kernel::V3D::round ( )
noexcept

◆ saveNexus()

void Mantid::Kernel::V3D::saveNexus ( ::NeXus::File *  file,
const std::string &  name 
) const

Save the object to an open NeXus file.

Parameters
file:: open NeXus file
name:: name of the data to create

Definition at line 412 of file V3D.cpp.

References m_pt.

Referenced by Mantid::Geometry::GoniometerAxis::saveNexus().

◆ scalar_prod()

constexpr double Mantid::Kernel::V3D::scalar_prod ( const V3D v) const
inlineconstexprnoexcept

Calculates the cross product.

Returns (this * v).

Parameters
v:: The second vector to include in the calculation
Returns
The cross product of the two vectors (this * v)

Definition at line 274 of file V3D.h.

Referenced by Mantid::Algorithms::GravitySANSHelper::calcSinTheta(), Mantid::Algorithms::TimeAtSampleStrategyElastic::calculate(), Mantid::MDAlgorithms::IntegratePeaksMD2::calculateDistanceToEdge(), Mantid::Algorithms::He3TubeEfficiency::calculateExponential(), Mantid::DataHandling::LoadDspacemap::CalculateOffsetsFromVulcanFactors(), Mantid::Geometry::IsotropicAtomBraggScatterer::calculateStructureFactor(), Mantid::DataObjects::BasePeak::calculateWavelengthFromQLab(), Mantid::Crystal::PeaksInRegion::checkTouchPoint(), Mantid::Crystal::PeaksOnSurface::checkTouchPoint(), Mantid::API::DetectorSearcher::convertQtoDirection(), Mantid::Algorithms::DetectorEfficiencyCor::correctForEfficiency(), cosAngle(), Mantid::Geometry::ObjCompAssembly::createOutline(), Mantid::MDAlgorithms::Integrate3DEvents::detectorQ(), Mantid::MDAlgorithms::IntegrateQLabEvents::detectorQ(), Mantid::Geometry::Plane::displace(), Mantid::Geometry::MeshObject2D::distance(), Mantid::Geometry::Cone::distance(), Mantid::Geometry::Cylinder::distance(), export_V3D(), Mantid::Geometry::IndexingUtils::FormUB_From_abc_Vectors(), Mantid::Geometry::IndexingUtils::GetIndexedPeaks_1D(), Mantid::Geometry::IndexingUtils::GetIndexedPeaks_3D(), Mantid::Geometry::IndexingUtils::GetMagFFT(), Mantid::Crystal::PredictPeaks::getPeakParametersFromQ(), Mantid::MDAlgorithms::IntegratePeaksMD2::getPinv(), Mantid::Geometry::Detector::getSignedTwoTheta(), Mantid::Geometry::DetectorGroup::getSignedTwoTheta(), Mantid::Geometry::MeshObjectCommon::getTriangleSolidAngle(), Mantid::Geometry::MeshObject2D::interceptSurface(), Mantid::Geometry::Line::intersect(), Mantid::Geometry::SpaceGroup::isAllowedReflection(), Mantid::Geometry::MeshObjectCommon::isOnTriangle(), Mantid::Geometry::ReferenceFrame::isVectorPointingAlongBeam(), Mantid::Geometry::Plane::LineIntersectionWithPlane(), Mantid::Crystal::lineIntersectsSphere(), Mantid::Geometry::NiggliCell::MakeNiggliUB(), Mantid::Geometry::IndexingUtils::NumberIndexed_1D(), Mantid::Geometry::IndexingUtils::NumberIndexed_3D(), Mantid::Geometry::Cone::onSurface(), Mantid::API::Projection::Projection(), Mantid::Kernel::Quat::Quat(), Mantid::Geometry::MeshObjectCommon::rayIntersectsTriangle(), Mantid::Geometry::IndexingUtils::ScanFor_Directions(), Mantid::Geometry::IndexingUtils::ScanFor_UB(), Mantid::Geometry::IndexingUtils::SelectDirection(), Mantid::Geometry::Cone::setBaseEqn(), Mantid::Geometry::Cylinder::setBaseEqn(), Mantid::Geometry::Sphere::setBaseEqn(), Mantid::Geometry::Plane::setPlane(), Mantid::DataObjects::Peak::setQLabFrame(), Mantid::Geometry::ConventionalCell::SetSidesIncreasing(), Mantid::Geometry::Plane::setSurface(), Mantid::Crystal::IntegratePeakTimeSlices::SetUpData1(), Mantid::Geometry::Cone::side(), Mantid::Crystal::PeaksOnSurface::validateExtentsInput(), Mantid::Geometry::CSGObject::volume(), and Mantid::Geometry::MeshObject::volume().

◆ setX()

void Mantid::Kernel::V3D::setX ( const double  xx)
inlinenoexcept

◆ setY()

void Mantid::Kernel::V3D::setY ( const double  yy)
inlinenoexcept

◆ setZ()

void Mantid::Kernel::V3D::setZ ( const double  zz)
inlinenoexcept

◆ spherical()

void Mantid::Kernel::V3D::spherical ( const double  R,
const double  theta,
const double  phi 
)
noexcept

Sets the vector position based on spherical coordinates.

Parameters
R:: The R value (distance)
theta:: The theta value (in degrees) = the polar angle away from the +Z axis.
phi:: The phi value (in degrees) = the azimuthal angle, where 0 points along +X and rotates clockwise in the XY plane

Definition at line 57 of file V3D.cpp.

References Mantid::Geometry::deg2rad.

Referenced by Mantid::Algorithms::AbsorptionCorrection::calculateDistances(), Mantid::Algorithms::PaalmanPingsAbsorptionCorrection::calculateDistances(), Mantid::Algorithms::MultipleScatteringCorrection::calculateL2Ds(), Mantid::DataHandling::LoadGSS::createInstrumentGeometry(), Mantid::Algorithms::ConvertToConstantL2::exec(), Mantid::Algorithms::EditInstrumentGeometry::exec(), Mantid::DataHandling::LoadInstrumentFromRaw::exec(), Mantid::DataHandling::LoadNXSPE::exec(), Mantid::DataHandling::SetScalingPSD::getDetPositionsFromRaw(), Mantid::Geometry::InstrumentDefinitionParser::getRelativeTranslation(), Mantid::DataHandling::LoadILLDiffraction::initMovingWorkspace(), Mantid::DataHandling::LoadILLIndirect2::moveComponent(), Mantid::Geometry::InstrumentDefinitionParser::parseFacingElementToV3D(), Mantid::Geometry::InstrumentDefinitionParser::parsePosition(), Mantid::Geometry::ShapeFactory::parsePosition(), Mantid::API::ExperimentInfo::populateInstrumentParameters(), Mantid::DataHandling::SetScalingPSD::processScalingFile(), Mantid::DataHandling::UpdateInstrumentFromFile::setDetectorPosition(), and Mantid::DataHandling::LoadDetectorInfo::updateParameterMap().

◆ spherical_rad()

void Mantid::Kernel::V3D::spherical_rad ( const double  R,
const double  polar,
const double  azimuth 
)
noexcept

Sets the vector position based on spherical coordinates, in radians.

Parameters
R:: The R value (distance)
polar:: the polar angle (in radians) away from the +Z axis.
azimuth:: the azimuthal angle (in radians), where 0 points along +X and rotates clockwise in the XY plane

Definition at line 70 of file V3D.cpp.

References Mantid::Kernel::Tolerance.

◆ toMillerIndexes()

double Mantid::Kernel::V3D::toMillerIndexes ( double  eps = 1.e-3)

transform vector into form, used to describe directions in crystallogaphical coodinate system

Definition at line 431 of file V3D.cpp.

References m_pt, and operator*=().

◆ toString()

std::string Mantid::Kernel::V3D::toString ( ) const

◆ unitVector()

bool Mantid::Kernel::V3D::unitVector ( const double  tolerance = Kernel::Tolerance) const
noexcept

Definition at line 251 of file V3D.cpp.

References tolerance.

Referenced by Mantid::Geometry::Track::reset(), and Mantid::Geometry::Track::Track().

◆ volume()

double Mantid::Kernel::V3D::volume ( ) const
inlinenoexcept

Calculate the volume of a cube X*Y*Z.

Definition at line 315 of file V3D.h.

◆ write()

void Mantid::Kernel::V3D::write ( std::ostream &  OX) const

Write out the point values.

Parameters
OX:: Output stream

Definition at line 330 of file V3D.cpp.

Referenced by Mantid::Geometry::Component::appendXML(), Mantid::Algorithms::DiffractionEventCalibrateDetectors::exec(), and toString().

◆ X()

constexpr double Mantid::Kernel::V3D::X ( ) const
inlineconstexprnoexcept

Get x.

Definition at line 232 of file V3D.h.

Referenced by Mantid::Geometry::CoplanarChecks::allCoplanar(), Mantid::MDAlgorithms::ConvertCWPDMDToSpectra::binMD(), Mantid::API::WorkspaceNearestNeighbours::build(), Mantid::Geometry::CSGObject::calcBoundingBoxByGeometry(), Mantid::Algorithms::GravitySANSHelper::calcComponents(), Mantid::CurveFitting::Algorithms::VesuvioCalculateGammaBackground::calculateBackgroundSingleFoil(), Mantid::Algorithms::VesuvioL1ThetaResolution::calculateDetector(), Mantid::MDAlgorithms::CalculateCoverageDGS::calculateIntersections(), Mantid::MDAlgorithms::MDNormDirectSC::calculateIntersections(), Mantid::MDAlgorithms::MDNormSCD::calculateIntersections(), Mantid::MDAlgorithms::MDNorm::calculateIntersections(), ComponentCreationHelper::cappedCylinderXML(), Mantid::Crystal::PredictPeaks::checkBeamDirection(), Mantid::MDAlgorithms::ConvertToDiffractionMDWorkspace::convertEventList(), Mantid::MDAlgorithms::ConvertCWSDExpToMomentum::convertToQSample(), WorkspaceCreationHelper::create2DWorkspaceWithReflectometryInstrumentMultiDetector(), Mantid::Algorithms::CreateSampleWorkspace::createCappedCylinder(), Mantid::DataHandling::SetSample::createCylinderLikeXML(), Mantid::DataHandling::SetSample::createFlatPlateXML(), Mantid::MDAlgorithms::ConvertCWSDMDtoHKL::createHKLMDWorkspace(), Mantid::Geometry::ObjCompAssembly::createOutline(), Mantid::Algorithms::CreateSampleWorkspace::createSphere(), ComponentCreationHelper::cuboidXML(), Mantid::Algorithms::AnnularRingAbsorption::cylinderXML(), Mantid::Algorithms::RectangularBeamProfile::defineActiveRegion(), Mantid::Algorithms::CircularBeamProfile::defineActiveRegion(), Mantid::MDAlgorithms::IntegratePeaksMD::detectorQ(), Mantid::Geometry::SymmetryElementWithAxisGenerator::determineAxis(), Mantid::Geometry::MeshObject2D::distanceToPlane(), Mantid::Geometry::BoundingBox::doesLineIntersect(), Mantid::Algorithms::ApplyCalibration::exec(), Mantid::Algorithms::ConvertAxesToRealSpace::exec(), Mantid::Algorithms::Qxy::exec(), Mantid::Crystal::CalculateUMatrix::exec(), Mantid::Crystal::OptimizeCrystalPlacement::exec(), Mantid::Crystal::PeaksOnSurface::exec(), Mantid::Crystal::SaveIsawPeaks::exec(), Mantid::DataHandling::SaveIsawDetCal::exec(), Mantid::DataHandling::SaveParameterFile::exec(), Mantid::MDAlgorithms::RecalculateTrajectoriesExtents::exec(), Mantid::WorkflowAlgorithms::DgsConvertToEnergyTransfer::exec(), export_V3D(), Mantid::MDAlgorithms::LoadDNSSCD::fillOutputWorkspace(), Mantid::Crystal::IntegratePeakTimeSlices::FindPlane(), Mantid::Crystal::SCDCalibratePanels2::generateCalibrationTable(), Mantid::DataObjects::Peak::getAzimuthal(), Mantid::Geometry::ObjComponent::getBoundingBox(), Mantid::Geometry::Cone::getBoundingBox(), Mantid::MDAlgorithms::GetSpiceDataRawCountsFromMD::getDetCounts(), Mantid::Geometry::HKLGenerator::getEndHKL(), Mantid::Crystal::IntegratePeakTimeSlices::getNeighborPixIDs(), Mantid::Crystal::PeakHKLErrors::getNewInstrument(), Mantid::Geometry::HKLGenerator::getSize(), V3DPickleSuite::getstate(), Mantid::Geometry::ObjComponent::getWidth(), ComponentCreationHelper::hollowCylinderXML(), Mantid::Geometry::MeshObject2D::initialize(), Mantid::Geometry::BoundingBox::isPointInside(), Mantid::Geometry::RandomPoint::localPointInCylinder(), Mantid::MDAlgorithms::makeAxisName(), Mantid::DataHandling::LoadILLSANS::moveDetectorDistance(), Mantid::DataHandling::LoadILLSANS::moveDetectorVertical(), Mantid::WorkflowAlgorithms::EQSANSLoad::moveToBeamCenter(), Mantid::Geometry::AtomPositionsEqual::operator()(), Mantid::Geometry::AtomPositionsLessThan::operator()(), Mantid::Kernel::Matrix< T >::operator*(), Mantid::Algorithms::ParallaxCorrection::performCorrection(), Mantid::Algorithms::CylinderAbsorption::sampleXML(), Mantid::Algorithms::FlatPlateAbsorption::sampleXML(), Mantid::DataObjects::LeanElasticPeaksWorkspace::saveNexus(), Mantid::Crystal::SCDCalibratePanels::saveXmlFile(), Mantid::Crystal::SCDCalibratePanels2::saveXmlFile(), Mantid::DataObjects::BasePeak::setHKL(), Mantid::Geometry::Sphere::side(), Mantid::Geometry::ComponentHelper::sphereXML(), ComponentCreationHelper::sphereXML(), Mantid::Geometry::InstrumentDefinitionParser::translateRotateXMLcuboid(), Mantid::Algorithms::Qhelper::waveLengthCutOff(), Mantid::Algorithms::ParabolicWeighting::weightAt(), and Mantid::DataHandling::SaveStl::writeTriangle().

◆ Y()

constexpr double Mantid::Kernel::V3D::Y ( ) const
inlineconstexprnoexcept

Get y.

Definition at line 233 of file V3D.h.

Referenced by Mantid::MDAlgorithms::ConvertCWPDMDToSpectra::binMD(), Mantid::API::WorkspaceNearestNeighbours::build(), Mantid::Geometry::CSGObject::calcBoundingBoxByGeometry(), Mantid::Algorithms::GravitySANSHelper::calcComponents(), Mantid::Algorithms::VesuvioL1ThetaResolution::calculateDetector(), Mantid::MDAlgorithms::CalculateCoverageDGS::calculateIntersections(), Mantid::MDAlgorithms::MDNormDirectSC::calculateIntersections(), Mantid::MDAlgorithms::MDNormSCD::calculateIntersections(), Mantid::MDAlgorithms::MDNorm::calculateIntersections(), ComponentCreationHelper::cappedCylinderXML(), Mantid::Crystal::PredictPeaks::checkBeamDirection(), Mantid::MDAlgorithms::ConvertToDiffractionMDWorkspace::convertEventList(), Mantid::MDAlgorithms::ConvertCWSDExpToMomentum::convertToQSample(), WorkspaceCreationHelper::create2DWorkspaceWithReflectometryInstrumentMultiDetector(), Mantid::Algorithms::CreateSampleWorkspace::createCappedCylinder(), Mantid::DataHandling::SetSample::createCylinderLikeXML(), Mantid::MDAlgorithms::ConvertCWSDMDtoHKL::createHKLMDWorkspace(), Mantid::Geometry::ObjCompAssembly::createOutline(), Mantid::Algorithms::CreateSampleWorkspace::createSphere(), Mantid::Algorithms::AnnularRingAbsorption::cylinderXML(), Mantid::Algorithms::RectangularBeamProfile::defineActiveRegion(), Mantid::Algorithms::CircularBeamProfile::defineActiveRegion(), Mantid::MDAlgorithms::IntegratePeaksMD::detectorQ(), Mantid::Geometry::SymmetryElementWithAxisGenerator::determineAxis(), Mantid::Geometry::MeshObject2D::distanceToPlane(), Mantid::Geometry::BoundingBox::doesLineIntersect(), Mantid::Algorithms::ApplyCalibration::exec(), Mantid::Algorithms::ConvertAxesToRealSpace::exec(), Mantid::Algorithms::Qxy::exec(), Mantid::Crystal::CalculateUMatrix::exec(), Mantid::Crystal::OptimizeCrystalPlacement::exec(), Mantid::Crystal::PeaksOnSurface::exec(), Mantid::Crystal::SaveIsawPeaks::exec(), Mantid::DataHandling::SaveIsawDetCal::exec(), Mantid::DataHandling::SaveParameterFile::exec(), Mantid::MDAlgorithms::RecalculateTrajectoriesExtents::exec(), Mantid::WorkflowAlgorithms::DgsConvertToEnergyTransfer::exec(), export_V3D(), Mantid::MDAlgorithms::LoadDNSSCD::fillOutputWorkspace(), Mantid::Crystal::IntegratePeakTimeSlices::FindPlane(), Mantid::Crystal::SCDCalibratePanels2::generateCalibrationTable(), Mantid::DataObjects::Peak::getAzimuthal(), Mantid::Geometry::ObjComponent::getBoundingBox(), Mantid::Geometry::Cone::getBoundingBox(), Mantid::MDAlgorithms::GetSpiceDataRawCountsFromMD::getDetCounts(), Mantid::Geometry::HKLGenerator::getEndHKL(), Mantid::Geometry::ObjComponent::getHeight(), Mantid::Crystal::IntegratePeakTimeSlices::getNeighborPixIDs(), Mantid::Crystal::PeakHKLErrors::getNewInstrument(), Mantid::Geometry::HKLGenerator::getSize(), V3DPickleSuite::getstate(), ComponentCreationHelper::hollowCylinderXML(), Mantid::Geometry::MeshObject2D::initialize(), Mantid::Geometry::BoundingBox::isPointInside(), Mantid::Geometry::RandomPoint::localPointInCylinder(), Mantid::MDAlgorithms::makeAxisName(), Mantid::DataHandling::LoadILLSANS::moveDetectorDistance(), Mantid::DataHandling::LoadILLSANS::moveDetectorHorizontal(), Mantid::WorkflowAlgorithms::EQSANSLoad::moveToBeamCenter(), Mantid::Geometry::AtomPositionsEqual::operator()(), Mantid::Geometry::AtomPositionsLessThan::operator()(), Mantid::Algorithms::ParallaxCorrection::performCorrection(), Mantid::DataHandling::LoadSwans::placeDetectorInSpace(), Mantid::Algorithms::CylinderAbsorption::sampleXML(), Mantid::Algorithms::FlatPlateAbsorption::sampleXML(), Mantid::DataObjects::LeanElasticPeaksWorkspace::saveNexus(), Mantid::Crystal::SCDCalibratePanels::saveXmlFile(), Mantid::Crystal::SCDCalibratePanels2::saveXmlFile(), Mantid::Geometry::Sphere::side(), Mantid::Geometry::ComponentHelper::sphereXML(), ComponentCreationHelper::sphereXML(), Mantid::Geometry::InstrumentDefinitionParser::translateRotateXMLcuboid(), Mantid::Algorithms::Qhelper::waveLengthCutOff(), Mantid::Algorithms::ParabolicWeighting::weightAt(), and Mantid::DataHandling::SaveStl::writeTriangle().

◆ Z()

constexpr double Mantid::Kernel::V3D::Z ( ) const
inlineconstexprnoexcept

Get z.

Definition at line 234 of file V3D.h.

Referenced by Mantid::DataHandling::AvrgDetector::addDetInfo(), Mantid::MDAlgorithms::ConvertCWPDMDToSpectra::binMD(), Mantid::API::WorkspaceNearestNeighbours::build(), Mantid::Geometry::CSGObject::calcBoundingBoxByGeometry(), Mantid::CurveFitting::Algorithms::VesuvioCalculateGammaBackground::calculateBackgroundSingleFoil(), Mantid::MDAlgorithms::CalculateCoverageDGS::calculateIntersections(), Mantid::MDAlgorithms::MDNormDirectSC::calculateIntersections(), Mantid::MDAlgorithms::MDNormSCD::calculateIntersections(), Mantid::MDAlgorithms::MDNorm::calculateIntersections(), Mantid::Crystal::IntegratePeakTimeSlices::CalculatePositionSpan(), ComponentCreationHelper::cappedCylinderXML(), Mantid::MDAlgorithms::ConvertToDiffractionMDWorkspace::convertEventList(), Mantid::MDAlgorithms::ConvertCWSDExpToMomentum::convertToQSample(), WorkspaceCreationHelper::create2DWorkspaceWithReflectometryInstrumentMultiDetector(), Mantid::Algorithms::CreateSampleWorkspace::createCappedCylinder(), Mantid::DataHandling::SetSample::createCylinderLikeXML(), Mantid::MDAlgorithms::ConvertCWSDMDtoHKL::createHKLMDWorkspace(), Mantid::Geometry::ObjCompAssembly::createOutline(), Mantid::Crystal::PredictSatellitePeaks::createPeakForOutputWorkspace(), Mantid::Algorithms::CreateSampleWorkspace::createSphere(), Mantid::Algorithms::AnnularRingAbsorption::cylinderXML(), Mantid::Algorithms::RectangularBeamProfile::defineActiveRegion(), Mantid::Algorithms::CircularBeamProfile::defineActiveRegion(), Mantid::MDAlgorithms::IntegratePeaksMD::detectorQ(), Mantid::Geometry::SymmetryElementWithAxisGenerator::determineAxis(), Mantid::Geometry::MeshObject2D::distanceToPlane(), Mantid::Geometry::BoundingBox::doesLineIntersect(), Mantid::Algorithms::ApplyCalibration::exec(), Mantid::Algorithms::ConvertAxesToRealSpace::exec(), Mantid::Crystal::CalculateUMatrix::exec(), Mantid::Crystal::OptimizeCrystalPlacement::exec(), Mantid::Crystal::PeaksOnSurface::exec(), Mantid::Crystal::PredictPeaks::exec(), Mantid::Crystal::SaveIsawPeaks::exec(), Mantid::DataHandling::LoadILLSANS::exec(), Mantid::DataHandling::SaveIsawDetCal::exec(), Mantid::DataHandling::SaveParameterFile::exec(), Mantid::MDAlgorithms::RecalculateTrajectoriesExtents::exec(), Mantid::WorkflowAlgorithms::DgsConvertToEnergyTransfer::exec(), export_V3D(), Mantid::MDAlgorithms::LoadDNSSCD::fillOutputWorkspace(), Mantid::Crystal::IntegratePeakTimeSlices::FindPlane(), Mantid::Crystal::SCDCalibratePanels2::generateCalibrationTable(), Mantid::Geometry::ObjComponent::getBoundingBox(), Mantid::Geometry::Cone::getBoundingBox(), Mantid::Geometry::ObjComponent::getDepth(), Mantid::MDAlgorithms::GetSpiceDataRawCountsFromMD::getDetCounts(), Mantid::Geometry::HKLGenerator::getEndHKL(), Mantid::Crystal::IntegratePeakTimeSlices::getNeighborPixIDs(), Mantid::Crystal::PeakHKLErrors::getNewInstrument(), Mantid::Geometry::HKLGenerator::getSize(), V3DPickleSuite::getstate(), ComponentCreationHelper::hollowCylinderXML(), Mantid::Geometry::MeshObject2D::initialize(), Mantid::Geometry::HKLFilterWavelength::isAllowed(), Mantid::Geometry::BoundingBox::isPointInside(), Mantid::Geometry::RandomPoint::localPointInCylinder(), Mantid::MDAlgorithms::makeAxisName(), Mantid::DataHandling::LoadILLSANS::moveDetectorHorizontal(), Mantid::DataHandling::LoadILLSANS::moveDetectorVertical(), Mantid::Geometry::AtomPositionsEqual::operator()(), Mantid::Geometry::AtomPositionsLessThan::operator()(), Mantid::Algorithms::ParallaxCorrection::performCorrection(), Mantid::Geometry::CSGObject::rayTraceSolidAngle(), Mantid::Algorithms::CylinderAbsorption::sampleXML(), Mantid::Algorithms::FlatPlateAbsorption::sampleXML(), Mantid::DataObjects::LeanElasticPeaksWorkspace::saveNexus(), Mantid::Crystal::SCDCalibratePanels::saveXmlFile(), Mantid::Crystal::SCDCalibratePanels2::saveXmlFile(), Mantid::Geometry::Sphere::side(), Mantid::Geometry::ComponentHelper::sphereXML(), ComponentCreationHelper::sphereXML(), Mantid::Geometry::InstrumentDefinitionParser::translateRotateXMLcuboid(), and Mantid::DataHandling::SaveStl::writeTriangle().

◆ zenith()

double Mantid::Kernel::V3D::zenith ( const V3D v) const
noexcept

Zenith (theta) angle between this and another vector.

Calculates the zenith angle (theta) of this vector with respect to another.

Parameters
v:: The other vector
Returns
The azimuthal angle in radians (0 < theta < pi)

Definition at line 150 of file V3D.cpp.

Referenced by export_V3D().

Member Data Documentation

◆ m_pt

std::array<double, 3> Mantid::Kernel::V3D::m_pt
private

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