SpherePackingScenarioGenerator
|
#include <ChannelPrinterHelper.h>
Public Member Functions | |
bool | areProjectionsSeparated (const Channel &unrotatedChannel, Channel &rotatedChannel) const |
bool | areRectanglesSeparatedAlongXOrYAxis (const Channel &unrotatedChannel, Channel &rotatedChannel) const |
bool | areRegionsSeparated (const double ®ion1LowerBound, const double ®ion1UpperBound, const double ®ion2LowerBound, const double ®ion2UpperBound) const |
ChannelPrinterHelper () | |
bool | doChannelsIntersect (const Channel &unrotatedChannel, Channel &rotatedChannel) const |
std::vector< xml::twoD::SubDomain > | generateSubDomains (const unsigned int &subDivPerDim) const |
std::vector< xml::twoD::SubDomain > | sortChannelsWithRespectToSubdomains (std::vector< Channel * > &channels, const unsigned int &subDivPerDim) const |
virtual | ~ChannelPrinterHelper () |
Private Types | |
typedef algorithms::geometries::Channel | Channel |
typedef algorithms::geometries::Channel xml::twoD::ChannelPrinterHelper::Channel [private] |
ChannelPrinterHelper::~ChannelPrinterHelper | ( | ) | [virtual] |
bool xml::twoD::ChannelPrinterHelper::areProjectionsSeparated | ( | const Channel & | unrotatedChannel, |
Channel & | rotatedChannel | ||
) | const [inline] |
Lines which do the projection of the rotated channel We don't have to bother with the other one as they are axis-alined, so the comparison is simple
left and right border of projection of rotated channel
left and right border of projection of rotated channel
bool xml::twoD::ChannelPrinterHelper::areRectanglesSeparatedAlongXOrYAxis | ( | const Channel & | unrotatedChannel, |
Channel & | rotatedChannel | ||
) | const [inline] |
bool xml::twoD::ChannelPrinterHelper::areRegionsSeparated | ( | const double & | region1LowerBound, |
const double & | region1UpperBound, | ||
const double & | region2LowerBound, | ||
const double & | region2UpperBound | ||
) | const [inline] |
check if if left and right end of region 1 are NOT in region 2
bool xml::twoD::ChannelPrinterHelper::doChannelsIntersect | ( | const Channel & | unrotatedChannel, |
Channel & | rotatedChannel | ||
) | const [inline] |
checks if two channels are neither separated along x and y axis nor their projections. If they are are in one way separated they do not intersect and we return false. Otherwise we return true.
std::vector< xml::twoD::SubDomain > ChannelPrinterHelper::generateSubDomains | ( | const unsigned int & | subDivPerDim | ) | const |
Generates vector of subdomains corresponding to our quadratic base domain. The scope (size) of the subdomains is enlarged reflecting the area covered by rotation of the domain.
std::vector< xml::twoD::SubDomain > ChannelPrinterHelper::sortChannelsWithRespectToSubdomains | ( | std::vector< Channel * > & | channels, |
const unsigned int & | subDivPerDim | ||
) | const |