Peano
Loading...
Searching...
No Matches
Region< dim, fp, topBoundaryInclusive > Struct Template Reference

#include <geometry.h>

Public Types

using D = dim
 
using P = fp
 
using Point = Point<D, P>
 

Public Member Functions

bool operator== (const Region &r) const
 
bool operator!= (const Region &r) const
 
P size () const
 
bool contains (const Point &p) const
 
bool containsEx (const Point &p) const
 
NumVec< i32, dim::N > containsAxis (const Point &p) const
 
bool overlaps (const Region &r) const
 
bool contains (const Region &r) const
 
bool sharesBoundary (const Region &r) const
 
Region intersection (const Region &r) const
 
Point centre () const
 
void split (u32 n, Region *regions) const
 
u32 splitIdx (u32 n, const Point &p) const
 

Static Public Member Functions

static Region fromInclusiveBounds (const Point &low, const Point &high)
 

Data Fields

Point low
 
Point high
 

Private Member Functions

bool _betweenIn (const fp min, const fp val, const fp max) const
 
bool _betweenEx (const fp min, const fp val, const fp max) const
 
bool between (const fp min, const fp val, const fp max) const
 

Friends

std::ostream & operator<< (std::ostream &stream, const Region &value)
 

Detailed Description

template<Dimensionality dim, Precision fp, bool topBoundaryInclusive = false>
struct Region< dim, fp, topBoundaryInclusive >

Definition at line 37 of file geometry.h.

Member Typedef Documentation

◆ D

template<Dimensionality dim, Precision fp, bool topBoundaryInclusive = false>
using Region< dim, fp, topBoundaryInclusive >::D = dim

Definition at line 53 of file geometry.h.

◆ P

template<Dimensionality dim, Precision fp, bool topBoundaryInclusive = false>
using Region< dim, fp, topBoundaryInclusive >::P = fp

Definition at line 54 of file geometry.h.

◆ Point

template<Dimensionality dim, Precision fp, bool topBoundaryInclusive = false>
using Region< dim, fp, topBoundaryInclusive >::Point = Point<D, P>

Definition at line 56 of file geometry.h.

Member Function Documentation

◆ _betweenEx()

template<Dimensionality dim, Precision fp, bool topBoundaryInclusive = false>
bool Region< dim, fp, topBoundaryInclusive >::_betweenEx ( const fp min,
const fp val,
const fp max ) const
private

Definition at line 43 of file geometry.h.

Referenced by Region< dim, fp, topBoundaryInclusive >::between().

Here is the caller graph for this function:

◆ _betweenIn()

template<Dimensionality dim, Precision fp, bool topBoundaryInclusive = false>
bool Region< dim, fp, topBoundaryInclusive >::_betweenIn ( const fp min,
const fp val,
const fp max ) const
private

Definition at line 39 of file geometry.h.

Referenced by Region< dim, fp, topBoundaryInclusive >::between(), and Region< dim, fp, topBoundaryInclusive >::containsEx().

Here is the caller graph for this function:

◆ between()

template<Dimensionality dim, Precision fp, bool topBoundaryInclusive = false>
bool Region< dim, fp, topBoundaryInclusive >::between ( const fp min,
const fp val,
const fp max ) const
private

◆ centre()

template<Dimensionality dim, Precision fp, bool topBoundaryInclusive = false>
Point Region< dim, fp, topBoundaryInclusive >::centre ( ) const

Definition at line 180 of file geometry.h.

◆ contains() [1/2]

template<Dimensionality dim, Precision fp, bool topBoundaryInclusive = false>
bool Region< dim, fp, topBoundaryInclusive >::contains ( const Point & p) const

Definition at line 89 of file geometry.h.

References Region< dim, fp, topBoundaryInclusive >::between().

Here is the call graph for this function:

◆ contains() [2/2]

template<Dimensionality dim, Precision fp, bool topBoundaryInclusive = false>
bool Region< dim, fp, topBoundaryInclusive >::contains ( const Region< dim, fp, topBoundaryInclusive > & r) const

Definition at line 124 of file geometry.h.

References Region< dim, fp, topBoundaryInclusive >::between(), and r.

Here is the call graph for this function:

◆ containsAxis()

template<Dimensionality dim, Precision fp, bool topBoundaryInclusive = false>
NumVec< i32, dim::N > Region< dim, fp, topBoundaryInclusive >::containsAxis ( const Point & p) const

Definition at line 105 of file geometry.h.

References Region< dim, fp, topBoundaryInclusive >::between().

Here is the call graph for this function:

◆ containsEx()

template<Dimensionality dim, Precision fp, bool topBoundaryInclusive = false>
bool Region< dim, fp, topBoundaryInclusive >::containsEx ( const Point & p) const

Definition at line 97 of file geometry.h.

References Region< dim, fp, topBoundaryInclusive >::_betweenIn().

Here is the call graph for this function:

◆ fromInclusiveBounds()

template<Dimensionality dim, Precision fp, bool topBoundaryInclusive = false>
static Region Region< dim, fp, topBoundaryInclusive >::fromInclusiveBounds ( const Point & low,
const Point & high )
static

◆ intersection()

template<Dimensionality dim, Precision fp, bool topBoundaryInclusive = false>
Region Region< dim, fp, topBoundaryInclusive >::intersection ( const Region< dim, fp, topBoundaryInclusive > & r) const

Definition at line 162 of file geometry.h.

References r.

◆ operator!=()

template<Dimensionality dim, Precision fp, bool topBoundaryInclusive = false>
bool Region< dim, fp, topBoundaryInclusive >::operator!= ( const Region< dim, fp, topBoundaryInclusive > & r) const

Definition at line 73 of file geometry.h.

References r.

◆ operator==()

template<Dimensionality dim, Precision fp, bool topBoundaryInclusive = false>
bool Region< dim, fp, topBoundaryInclusive >::operator== ( const Region< dim, fp, topBoundaryInclusive > & r) const

Definition at line 69 of file geometry.h.

References r.

◆ overlaps()

template<Dimensionality dim, Precision fp, bool topBoundaryInclusive = false>
bool Region< dim, fp, topBoundaryInclusive >::overlaps ( const Region< dim, fp, topBoundaryInclusive > & r) const

Definition at line 116 of file geometry.h.

References r.

◆ sharesBoundary()

template<Dimensionality dim, Precision fp, bool topBoundaryInclusive = false>
bool Region< dim, fp, topBoundaryInclusive >::sharesBoundary ( const Region< dim, fp, topBoundaryInclusive > & r) const

Definition at line 144 of file geometry.h.

References r.

◆ size()

template<Dimensionality dim, Precision fp, bool topBoundaryInclusive = false>
P Region< dim, fp, topBoundaryInclusive >::size ( ) const

◆ split()

template<Dimensionality dim, Precision fp, bool topBoundaryInclusive = false>
void Region< dim, fp, topBoundaryInclusive >::split ( u32 n,
Region< dim, fp, topBoundaryInclusive > * regions ) const

Definition at line 184 of file geometry.h.

References Region< dim, fp, topBoundaryInclusive >::low.

◆ splitIdx()

template<Dimensionality dim, Precision fp, bool topBoundaryInclusive = false>
u32 Region< dim, fp, topBoundaryInclusive >::splitIdx ( u32 n,
const Point & p ) const

Definition at line 205 of file geometry.h.

References assert, and Region< dim, fp, topBoundaryInclusive >::low.

Friends And Related Symbol Documentation

◆ operator<<

template<Dimensionality dim, Precision fp, bool topBoundaryInclusive = false>
std::ostream & operator<< ( std::ostream & stream,
const Region< dim, fp, topBoundaryInclusive > & value )
friend

Definition at line 231 of file geometry.h.

Field Documentation

◆ high

template<Dimensionality dim, Precision fp, bool topBoundaryInclusive = false>
Point Region< dim, fp, topBoundaryInclusive >::high

◆ low


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