OGS
MeshLib::Node Class Reference

Detailed Description

A mesh node with coordinates in 3D space.

Definition at line 40 of file Node.h.

#include <Node.h>

Inheritance diagram for MeshLib::Node:
[legend]
Collaboration diagram for MeshLib::Node:
[legend]

Public Member Functions

 Node (const double coords[3], std::size_t id=std::numeric_limits< std::size_t >::max())
 Constructor using a coordinate array.
 Node (std::array< double, 3 > const &coords, std::size_t id=std::numeric_limits< std::size_t >::max())
 Constructor using a coordinate array.
 Node (double x, double y, double z, std::size_t id=std::numeric_limits< std::size_t >::max())
 Constructor using single coordinates.
 Node (const Node &node)
 Copy constructor.
Public Member Functions inherited from MathLib::Point3dWithID
 Point3dWithID (double x0, double x1, double x2, std::size_t id=std::numeric_limits< std::size_t >::max())
 Point3dWithID (std::array< double, 3 > const &coords, std::size_t id=std::numeric_limits< std::size_t >::max())
 Point3dWithID (MathLib::Point3d const &pnt, std::size_t id=std::numeric_limits< std::size_t >::max())
 Point3dWithID ()
std::size_t getID () const
Public Member Functions inherited from MathLib::Point3d
 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 ()

Friends

class Mesh
class MeshToolsLib::MeshRevision
std::ostream & operator<< (std::ostream &os, MeshLib::Node const &n)

Additional Inherited Members

Protected Member Functions inherited from MathLib::Point3dWithID
void setID (std::size_t id)
 Sets the ID of a node to the given value.

Constructor & Destructor Documentation

◆ Node() [1/4]

MeshLib::Node::Node ( const double coords[3],
std::size_t id = std::numeric_limits<std::size_t>::max() )
explicit

Constructor using a coordinate array.

Definition at line 21 of file Node.cpp.

22 : MathLib::Point3dWithID(
23 std::array<double, 3>{{coords[0], coords[1], coords[2]}}, id)
24{
25}
constexpr ranges::views::view_closure coords
Definition Mesh.h:234

References MathLib::Point3dWithID::Point3dWithID().

Referenced by FileIO::Gocad::GocadNode::GocadNode(), Node(), and MeshToolsLib::MeshRevision.

◆ Node() [2/4]

MeshLib::Node::Node ( std::array< double, 3 > const & coords,
std::size_t id = std::numeric_limits<std::size_t>::max() )
explicit

Constructor using a coordinate array.

Definition at line 27 of file Node.cpp.

28 : MathLib::Point3dWithID(coords, id)
29{
30}

References MathLib::Point3dWithID::Point3dWithID().

◆ Node() [3/4]

MeshLib::Node::Node ( double x,
double y,
double z,
std::size_t id = std::numeric_limits<std::size_t>::max() )

Constructor using single coordinates.

Definition at line 32 of file Node.cpp.

33 : MathLib::Point3dWithID(std::array<double, 3>({{x, y, z}}), id)
34{
35}

References MathLib::Point3dWithID::Point3dWithID().

◆ Node() [4/4]

MeshLib::Node::Node ( const Node & node)

Copy constructor.

Definition at line 37 of file Node.cpp.

37: MathLib::Point3dWithID(node, node.getID()) {}

References Node(), MathLib::Point3dWithID::Point3dWithID(), and MathLib::Point3dWithID::getID().

◆ Mesh

friend class Mesh
friend

Definition at line 43 of file Node.h.

References Mesh.

Referenced by Mesh.

◆ MeshToolsLib::MeshRevision

friend class MeshToolsLib::MeshRevision
friend

Definition at line 44 of file Node.h.

References Node().

◆ operator<<

std::ostream & operator<< ( std::ostream & os,
MeshLib::Node const & n )
friend

Definition at line 39 of file Node.cpp.

40{
41 return os << "node #" << n.getID() << " { "
42 << static_cast<MathLib::Point3d const&>(n) << "}";
43}

References MathLib::Point3dWithID::getID().


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