OGS
MathLib::Point3d Class Reference

Detailed Description

Definition at line 26 of file Point3d.h.

#include <Point3d.h>

Inheritance diagram for MathLib::Point3d:
[legend]

Public Member Functions

 Point3d ()
 
 Point3d (std::array< double, 3 > x)
 
virtual ~Point3d ()=default
 
 Point3d (Point3d const &)=default
 
Point3doperator= (Point3d const &)=default
 
const double & operator[] (std::size_t idx) const
 const access operator The access to the point coordinates is like the access to a field. Code example: More...
 
double & operator[] (std::size_t idx)
 access operator (see book Effektiv C++ programmieren - subsection 1.3.2 ). More...
 
const double * data () const
 
double * data ()
 
Eigen::Vector3d const & asEigenVector3d () const
 
Eigen::Vector3d & asEigenVector3d ()
 

Private Attributes

Eigen::Vector3d x_
 

Constructor & Destructor Documentation

◆ Point3d() [1/3]

MathLib::Point3d::Point3d ( )

default constructor with zero coordinates

Definition at line 15 of file Point3d.cpp.

15: x_({0, 0, 0}) {}
Eigen::Vector3d x_
Definition: Point3d.h:71

◆ Point3d() [2/3]

MathLib::Point3d::Point3d ( std::array< double, 3 >  x)
explicit

constructor - constructs a Point3d object

Parameters
xstd::array containing the coordinates of the point

Definition at line 17 of file Point3d.cpp.

17: x_(x[0], x[1], x[2]) {}

◆ ~Point3d()

virtual MathLib::Point3d::~Point3d ( )
virtualdefault

virtual destructor

◆ Point3d() [3/3]

MathLib::Point3d::Point3d ( Point3d const &  )
default

Member Function Documentation

◆ asEigenVector3d() [1/2]

Eigen::Vector3d & MathLib::Point3d::asEigenVector3d ( )
inline

Definition at line 68 of file Point3d.h.

68{ return x_; }

References x_.

◆ asEigenVector3d() [2/2]

Eigen::Vector3d const & MathLib::Point3d::asEigenVector3d ( ) const
inline

Definition at line 67 of file Point3d.h.

67{ return x_; }

References x_.

Referenced by ProcessLib::HeatTransportBHE::HeatTransportBHELocalAssemblerBHE< ShapeFunction, IntegrationMethod, BHEType >::HeatTransportBHELocalAssemblerBHE(), ProcessLib::NormalTractionBoundaryCondition::NormalTractionBoundaryConditionLocalAssembler< ShapeFunctionDisplacement, IntegrationMethod, GlobalDim >::NormalTractionBoundaryConditionLocalAssembler(), LayeredVolume::addLayerBoundaries(), MathLib::barycentricPointInTriangle(), MathLib::calcProjPntToLineAndDists(), MathLib::calcTetrahedronVolume(), MathLib::calcTriangleArea(), MeshLib::calculateNormalizedSurfaceNormal(), MathLib::gaussPointInTriangle(), GeoLib::generateEquidistantPoints(), MathLib::getAngle(), MeshLib::getCenterOfGravity(), GeoLib::Polyline::getDistanceAlongPolyline(), MeshLib::ProjectPointOnMesh::getElevation(), MeshLib::FaceRule::getFirstSurfaceVector(), MeshLib::FaceRule::getSecondSurfaceVector(), ProcessLib::SmallDeformationNonlocal::SmallDeformationNonlocalLocalAssembler< ShapeFunction, IntegrationMethod, DisplacementDim >::getSingleIntegrationPointCoordinates(), ProcessLib::SurfaceFluxLocalAssembler< ShapeFunction, IntegrationMethod, GlobalDim >::getSurfaceNormal(), ProcessLib::LIE::SmallDeformation::SmallDeformationProcess< DisplacementDim >::initializeConcreteProcess(), MathLib::isCoplanar(), GeoLib::lineSegmentIntersect(), MeshGeoToolsLib::mapPointOnSurfaceElement(), MathLib::orientation3d(), MathLib::sqrDist(), MeshLib::CellRule::testElementNodeOrder(), testTriangleIntersectingAABB(), and GeoLib::triangleLineIntersection().

◆ data() [1/2]

double * MathLib::Point3d::data ( )
inline

Definition at line 65 of file Point3d.h.

65{ return x_.data(); }

References x_.

◆ data() [2/2]

const double * MathLib::Point3d::data ( ) const
inline

◆ operator=()

Point3d & MathLib::Point3d::operator= ( Point3d const &  )
default

◆ operator[]() [1/2]

double & MathLib::Point3d::operator[] ( std::size_t  idx)
inline

access operator (see book Effektiv C++ programmieren - subsection 1.3.2 ).

See also
const T& operator[] (std::size_t idx) const

Definition at line 57 of file Point3d.h.

58 {
59 return const_cast<double&>(static_cast<const Point3d&>(*this)[idx]);
60 }

◆ operator[]() [2/2]

const double & MathLib::Point3d::operator[] ( std::size_t  idx) const
inline

const access operator The access to the point coordinates is like the access to a field. Code example:

Point<double> point (1.0, 2.0, 3.0); double sqrNrm2 =
point[0] * point[0] + point[1] * point[1] + point[2] + point[2];

Definition at line 49 of file Point3d.h.

50 {
51 assert(idx < 3);
52 return x_[idx];
53 }

References x_.

Member Data Documentation

◆ x_

Eigen::Vector3d MathLib::Point3d::x_
private

Definition at line 71 of file Point3d.h.

Referenced by asEigenVector3d(), data(), and operator[]().


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