OGS
MathLib::Point3d Class Reference

Detailed Description

Definition at line 22 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:
 
double & operator[] (std::size_t idx)
 access operator (see book Effektiv C++ programmieren - subsection 1.3.2 ).
 
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:67

◆ 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 64 of file Point3d.h.

64{ return x_; }

References x_.

◆ asEigenVector3d() [2/2]

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

Definition at line 63 of file Point3d.h.

63{ return x_; }

References x_.

Referenced by ProcessLib::HeatTransportBHE::HeatTransportBHELocalAssemblerBHE< ShapeFunction, BHEType >::HeatTransportBHELocalAssemblerBHE(), GeoLib::MinimalBoundingSphere::MinimalBoundingSphere(), GeoLib::MinimalBoundingSphere::MinimalBoundingSphere(), GeoLib::MinimalBoundingSphere::MinimalBoundingSphere(), ProcessLib::NormalTractionBoundaryCondition::NormalTractionBoundaryConditionLocalAssembler< ShapeFunctionDisplacement, 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(), MeshToolsLib::ProjectPointOnMesh::getElevation(), getExistingNodeFromOctTree(), MeshLib::FaceRule::getFirstSurfaceVector(), MeshLib::FaceRule::getSecondSurfaceVector(), ProcessLib::SmallDeformationNonlocal::SmallDeformationNonlocalLocalAssembler< ShapeFunction, DisplacementDim >::getSingleIntegrationPointCoordinates(), ProcessLib::SurfaceFluxLocalAssembler< ShapeFunction, GlobalDim >::getSurfaceNormal(), ProcessLib::LIE::SmallDeformation::SmallDeformationProcess< DisplacementDim >::initializeConcreteProcess(), MathLib::isCoplanar(), GeoLib::lineSegmentIntersect(), MeshGeoToolsLib::mapPointOnSurfaceElement(), MeshToolsLib::moveMeshNodes(), MathLib::orientation3d(), MathLib::sqrDist(), MeshLib::CellRule::testElementNodeOrder(), anonymous_namespace{AddFaultToVoxelGrid.cpp}::testTriangleIntersectingAABB(), and GeoLib::triangleLineIntersection().

◆ data() [1/2]

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

Definition at line 61 of file Point3d.h.

61{ return x_.data(); }

References x_.

◆ data() [2/2]

◆ 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 53 of file Point3d.h.

54 {
55 return const_cast<double&>(static_cast<const Point3d&>(*this)[idx]);
56 }

◆ 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 45 of file Point3d.h.

46 {
47 assert(idx < 3);
48 return x_[idx];
49 }

References x_.

Member Data Documentation

◆ x_

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

Definition at line 67 of file Point3d.h.

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


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