RINGMesh  Version 5.0.0
A programming library for geological model meshes
RINGMesh::Box< DIMENSION > Class Template Reference

#include <box.h>

Public Member Functions

bool initialized () const
 
void clear ()
 
const vecn< DIMENSION > & min () const
 
const vecn< DIMENSION > & max () const
 
vecn< DIMENSION > center () const
 
vecn< DIMENSION > diagonal () const
 
void add_point (const vecn< DIMENSION > &p)
 
void add_box (const Box< DIMENSION > &b)
 
bool bboxes_overlap (const Box< DIMENSION > &B) const
 
Box< DIMENSION > bbox_union (const Box< DIMENSION > &B) const
 
std::tuple< bool, Box< DIMENSION > > bbox_intersection (const Box< DIMENSION > &B) const
 
bool contains (const vecn< DIMENSION > &b) const
 
double distance_to_center (const vecn< DIMENSION > &p) const
 
double signed_distance (const vecn< DIMENSION > &p) const
 

Private Attributes

bool initialized_ { false }
 
vecn< DIMENSION > min_ {}
 
vecn< DIMENSION > max_ {}
 

Detailed Description

template<index_t DIMENSION>
class RINGMesh::Box< DIMENSION >

Definition at line 48 of file box.h.

Member Function Documentation

◆ add_box()

template<index_t DIMENSION>
void RINGMesh::Box< DIMENSION >::add_box ( const Box< DIMENSION > &  b)
inline

Definition at line 83 of file box.h.

◆ add_point()

template<index_t DIMENSION>
void RINGMesh::Box< DIMENSION >::add_point ( const vecn< DIMENSION > &  p)

Definition at line 57 of file box.cpp.

◆ bbox_intersection()

template<index_t DIMENSION>
std::tuple< bool, Box< DIMENSION > > RINGMesh::Box< DIMENSION >::bbox_intersection ( const Box< DIMENSION > &  B) const
inline

Computes the intersection between this box and another one

Parameters
[in]Banother box
Returns
a tuple containing:
  • a boolean (true if the two boxes do intersect, false otherwise).
  • the box corresponding to the intersection.

Definition at line 122 of file box.h.

◆ bbox_union()

template<index_t DIMENSION>
Box< DIMENSION > RINGMesh::Box< DIMENSION >::bbox_union ( const Box< DIMENSION > &  B) const
inline

Definition at line 108 of file box.h.

◆ bboxes_overlap()

template<index_t DIMENSION>
bool RINGMesh::Box< DIMENSION >::bboxes_overlap ( const Box< DIMENSION > &  B) const
inline

Definition at line 92 of file box.h.

◆ center()

template<index_t DIMENSION>
vecn< DIMENSION > RINGMesh::Box< DIMENSION >::center ( ) const
inline

Definition at line 71 of file box.h.

◆ clear()

template<index_t DIMENSION>
void RINGMesh::Box< DIMENSION >::clear ( )
inline

Definition at line 56 of file box.h.

◆ contains()

template<index_t DIMENSION>
bool RINGMesh::Box< DIMENSION >::contains ( const vecn< DIMENSION > &  b) const
inline

Definition at line 143 of file box.h.

◆ diagonal()

template<index_t DIMENSION>
vecn< DIMENSION > RINGMesh::Box< DIMENSION >::diagonal ( ) const
inline

Definition at line 76 of file box.h.

◆ distance_to_center()

template<index_t DIMENSION>
double RINGMesh::Box< DIMENSION >::distance_to_center ( const vecn< DIMENSION > &  p) const

Definition at line 108 of file box.cpp.

◆ initialized()

template<index_t DIMENSION>
bool RINGMesh::Box< DIMENSION >::initialized ( ) const
inline

Definition at line 51 of file box.h.

◆ max()

template<index_t DIMENSION>
const vecn< DIMENSION >& RINGMesh::Box< DIMENSION >::max ( ) const
inline

Definition at line 66 of file box.h.

◆ min()

template<index_t DIMENSION>
const vecn< DIMENSION >& RINGMesh::Box< DIMENSION >::min ( ) const
inline

Definition at line 61 of file box.h.

◆ signed_distance()

template<index_t DIMENSION>
double RINGMesh::Box< DIMENSION >::signed_distance ( const vecn< DIMENSION > &  p) const

Definition at line 76 of file box.cpp.

Member Data Documentation

◆ initialized_

template<index_t DIMENSION>
bool RINGMesh::Box< DIMENSION >::initialized_ { false }
private

Definition at line 164 of file box.h.

◆ max_

template<index_t DIMENSION>
vecn< DIMENSION > RINGMesh::Box< DIMENSION >::max_ {}
private

Definition at line 166 of file box.h.

◆ min_

template<index_t DIMENSION>
vecn< DIMENSION > RINGMesh::Box< DIMENSION >::min_ {}
private

Definition at line 165 of file box.h.


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