PTEMS  0.1.0-dev+git.81fd0e4
PolyTopic Element Method Solver
ptems::BBox< DIM > Struct Template Reference

Defines a bounding box by opposite corners (minimum and maximum point) More...

#include <ptems/vector.hpp>

Collaboration diagram for ptems::BBox< DIM >:

Public Member Functions

 BBox ()
 Create an undefined bounding box (has Maximum < Minimum) More...
 
 BBox (const Vector< DIM > &min, const Vector< DIM > &max)
 Create a bounding box. More...
 
void AddPoint (const Vector< DIM > &point)
 Adds a point, expanding the bounding box as necessary. More...
 
Vector< DIM > ToLocal (const Vector< 2 > &pt)
 Convert a global coordinate to a local coordinate on the bounding box space \([-1,1]^D\). More...
 

Public Attributes

Vector< DIM > Minimum
 The minimum point of the bounding box. More...
 
Vector< DIM > Maximum
 The maximum point of the bounding box. More...
 

Detailed Description

template<std::size_t DIM>
struct ptems::BBox< DIM >

Defines a bounding box by opposite corners (minimum and maximum point)

Template Parameters
DIMThe dimension of the space the bounding box is in

Constructor & Destructor Documentation

◆ BBox() [1/2]

template<std::size_t DIM>
ptems::BBox< DIM >::BBox ( )
inline

Create an undefined bounding box (has Maximum < Minimum)

◆ BBox() [2/2]

template<std::size_t DIM>
ptems::BBox< DIM >::BBox ( const Vector< DIM > &  min,
const Vector< DIM > &  max 
)
inline

Create a bounding box.

Parameters
minMinimum point for the bounding box
maxMaximum point for the bounding box

Member Function Documentation

◆ AddPoint()

template<std::size_t DIM>
void ptems::BBox< DIM >::AddPoint ( const Vector< DIM > &  point)
inline

Adds a point, expanding the bounding box as necessary.

Parameters
pointPoint to ensure inside bounding box

◆ ToLocal()

template<std::size_t DIM>
Vector<DIM> ptems::BBox< DIM >::ToLocal ( const Vector< 2 > &  pt)
inline

Convert a global coordinate to a local coordinate on the bounding box space \([-1,1]^D\).

Parameters
ptThe point in global space
Returns
Point in local space defined by this bounding box

Member Data Documentation

◆ Maximum

template<std::size_t DIM>
Vector<DIM> ptems::BBox< DIM >::Maximum

The maximum point of the bounding box.

◆ Minimum

template<std::size_t DIM>
Vector<DIM> ptems::BBox< DIM >::Minimum

The minimum point of the bounding box.


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