OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
BoundingBox Class Reference

#include <BoundingBox.h>

Collaboration diagram for BoundingBox:
Collaboration graph
[legend]

Public Member Functions

 BoundingBox ()
 
void enlargeToContainPosition (const Vector_t &position)
 
void enlargeToContainBoundingBox (const BoundingBox &boundingBox)
 
boost::optional< Vector_tgetIntersectionPoint (const Vector_t &position, const Vector_t &direction) const
 
bool isInside (const Vector_t &position) const
 
bool isOutside (const Vector_t &position) const
 
void print (std::ostream &output) const
 
std::pair< Vector_t, Vector_tgetCorners () const
 

Static Public Member Functions

static BoundingBox getBoundingBox (const std::vector< Vector_t > &positions)
 

Private Attributes

Vector_t lowerLeftCorner_m
 
Vector_t upperRightCorner_m
 

Detailed Description

Definition at line 33 of file BoundingBox.h.

Constructor & Destructor Documentation

◆ BoundingBox()

BoundingBox::BoundingBox ( )

Definition at line 26 of file BoundingBox.cpp.

Member Function Documentation

◆ enlargeToContainBoundingBox()

void BoundingBox::enlargeToContainBoundingBox ( const BoundingBox boundingBox)

Definition at line 49 of file BoundingBox.cpp.

References lowerLeftCorner_m, max(), min(), and upperRightCorner_m.

Referenced by OrbitThreader::computeBoundingBox().

Here is the call graph for this function:

◆ enlargeToContainPosition()

void BoundingBox::enlargeToContainPosition ( const Vector_t position)

◆ getBoundingBox()

BoundingBox BoundingBox::getBoundingBox ( const std::vector< Vector_t > &  positions)
static

Definition at line 31 of file BoundingBox.cpp.

References enlargeToContainPosition().

Referenced by ElementBase::getBoundingBoxInLabCoords().

Here is the call graph for this function:

◆ getCorners()

std::pair< Vector_t, Vector_t > BoundingBox::getCorners ( ) const
inline

Definition at line 57 of file BoundingBox.h.

References lowerLeftCorner_m, and upperRightCorner_m.

◆ getIntersectionPoint()

boost::optional< Vector_t > BoundingBox::getIntersectionPoint ( const Vector_t position,
const Vector_t direction 
) const

Definition at line 57 of file BoundingBox.cpp.

References dot(), euclidean_norm(), lowerLeftCorner_m, max(), sign(), and upperRightCorner_m.

Referenced by OrbitThreader::computeDriftLengthToBoundingBox().

Here is the call graph for this function:

◆ isInside()

bool BoundingBox::isInside ( const Vector_t position) const

Definition at line 99 of file BoundingBox.cpp.

References lowerLeftCorner_m, and upperRightCorner_m.

Referenced by isOutside().

◆ isOutside()

bool BoundingBox::isOutside ( const Vector_t position) const
inline

Definition at line 62 of file BoundingBox.h.

References isInside().

Referenced by ParallelTTracker::hasEndOfLineReached().

Here is the call graph for this function:

◆ print()

void BoundingBox::print ( std::ostream &  output) const

Definition at line 109 of file BoundingBox.cpp.

References endl(), lowerLeftCorner_m, Inform::precision(), and upperRightCorner_m.

Here is the call graph for this function:

Member Data Documentation

◆ lowerLeftCorner_m

Vector_t BoundingBox::lowerLeftCorner_m
private

◆ upperRightCorner_m

Vector_t BoundingBox::upperRightCorner_m
private

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