RINGMesh  Version 5.0.0
A programming library for geological model meshes
RINGMesh::Geometry::Segment< DIMENSION > Struct Template Reference

#include <geometry.h>

Public Member Functions

 Segment ()=default
 
 Segment (vecn< DIMENSION > p0, vecn< DIMENSION > p1)
 
vecn< DIMENSION > direction () const
 
vecn< DIMENSION > barycenter () const
 
double length () const
 

Public Attributes

vecn< DIMENSION > p0 {}
 
vecn< DIMENSION > p1 {}
 

Detailed Description

template<index_t DIMENSION>
struct RINGMesh::Geometry::Segment< DIMENSION >

Definition at line 97 of file geometry.h.

Constructor & Destructor Documentation

◆ Segment() [1/2]

template<index_t DIMENSION>
RINGMesh::Geometry::Segment< DIMENSION >::Segment ( )
default

◆ Segment() [2/2]

template<index_t DIMENSION>
RINGMesh::Geometry::Segment< DIMENSION >::Segment ( vecn< DIMENSION >  p0,
vecn< DIMENSION >  p1 
)
inline

Definition at line 100 of file geometry.h.

Member Function Documentation

◆ barycenter()

template<index_t DIMENSION>
vecn< DIMENSION > RINGMesh::Geometry::Segment< DIMENSION >::barycenter ( ) const
inline

Definition at line 112 of file geometry.h.

◆ direction()

template<index_t DIMENSION>
vecn< DIMENSION > RINGMesh::Geometry::Segment< DIMENSION >::direction ( ) const
inline

Returns a normalized vector aligned on the segment going from p0_ to p1_.

Definition at line 108 of file geometry.h.

◆ length()

template<index_t DIMENSION>
double RINGMesh::Geometry::Segment< DIMENSION >::length ( ) const
inline

Definition at line 116 of file geometry.h.

Member Data Documentation

◆ p0

template<index_t DIMENSION>
vecn< DIMENSION > RINGMesh::Geometry::Segment< DIMENSION >::p0 {}

Definition at line 120 of file geometry.h.

◆ p1

template<index_t DIMENSION>
vecn< DIMENSION > RINGMesh::Geometry::Segment< DIMENSION >::p1 {}

Definition at line 121 of file geometry.h.


The documentation for this struct was generated from the following file: