Parasol Planning Library (PPL)
Functions
BoundaryIntersection.cpp File Reference
#include "Geometry/Boundaries/BoundaryIntersection.h"
#include "Geometry/Boundaries/Boundary.h"
#include "Utilities/PMPLExceptions.h"
Include dependency graph for BoundaryIntersection.cpp:

Functions

std::vector< double > RejectionSampleIntersection (const Boundary *const _b1, const Boundary *const _b2, const size_t _maxAttempts, size_t *const _attempts) noexcept
 

Function Documentation

◆ RejectionSampleIntersection()

std::vector<double> RejectionSampleIntersection ( const Boundary *const  _b1,
const Boundary *const  _b2,
const size_t  _maxAttempts = 10,
size_t *const  _attempts = nullptr 
)
noexcept

Use rejection sampling to find a point on the intersection of two boundaries.

Parameters
_b1The first boundary.
_b2The second boundary.
_maxAttemptsThe maximum number of attempts.
_attemptsOptionally returns the number of attempts made.
Returns
A point within both boundaries, or an empty vector if none was found.