Commit 0827cd5f authored by Philipp Schäfer's avatar Philipp Schäfer
Browse files

ART

- RayGrid: renamed a few functions
- RayResolutionAdapter: is now private derivation of RayGrid
parent 7cd50223
......@@ -83,12 +83,12 @@ namespace ITAPropagationPathSim
/**
* Returns an empty ray grid if the given ray is not part of this ray grid.
*/
CRayGrid GetNeighboringRays(const std::shared_ptr<CRay>& pRay) const;
CRayGrid GetSurroundingGrid(const std::shared_ptr<CRay>& pRay) const;
//! Sets the boundaries of this ray grid to the rays surrounding the given ray (including this ray).
/**
* If the ray is not part of this ray grid, this will be empty.
*/
void SetToNeighboringRays(const std::shared_ptr<CRay>& pRay);
void SetToSurroundingGrid(const std::shared_ptr<CRay>& pRay);
//! Creates a ray grid with the same initial ray directions but new rays
CRayGrid CopyWithNewRays() const;
......
......@@ -111,7 +111,7 @@ namespace ITAPropagationPathSim
{
std::vector<CRayGrid> rayGridsOfReflectionOrder;
for each (RayPtr pRay in vpMinDistanceRays)
rayGridsOfReflectionOrder.push_back(initialRayGrid.GetNeighboringRays(pRay).CopyWithNewRays());
rayGridsOfReflectionOrder.push_back(initialRayGrid.GetSurroundingGrid(pRay).CopyWithNewRays());
return rayGridsOfReflectionOrder;
}
......
......@@ -3,6 +3,12 @@
using namespace ITAPropagationPathSim::AtmosphericRayTracing;
using namespace ITAPropagationPathSim::AtmosphericRayTracing::EigenraySearch;
void CRayResolutionAdapter::Reset(const CRayGrid& rayGrid)
{
*this = rayGrid;
vpNewRaysOfLastAdaptation.clear();
}
bool CRayResolutionAdapter::ZoomIntoRay(std::shared_ptr<CRay> pRay)
{
vpNewRaysOfLastAdaptation.clear();
......@@ -12,7 +18,7 @@ bool CRayResolutionAdapter::ZoomIntoRay(std::shared_ptr<CRay> pRay)
if (ConstRayVectorReference().size() <= 1)
return false;
SetToNeighboringRays(pRay);
SetToSurroundingGrid(pRay);
DoubleRayResolution();
return true;
......
......@@ -28,7 +28,7 @@ namespace ITAPropagationPathSim
{
namespace EigenraySearch
{
class CRayResolutionAdapter : public CRayGrid
class CRayResolutionAdapter : private CRayGrid
{
private:
std::vector< std::shared_ptr<CRay> > vpNewRaysOfLastAdaptation;
......@@ -37,6 +37,10 @@ namespace ITAPropagationPathSim
CRayResolutionAdapter(const CRayGrid& rayGrid) : CRayGrid(rayGrid) {}
public:
void Reset(const CRayGrid& rayGrid);
CRayGrid RayGrid() { return *this; }
std::vector< std::shared_ptr<CRay> > Rays() { return CRayGrid::Rays(); }
std::vector< std::shared_ptr<CRay> > NewRaysOfLastAdaptation() { return vpNewRaysOfLastAdaptation; }
bool ZoomIntoRay(std::shared_ptr<CRay> pRay);
......
......@@ -85,7 +85,7 @@ void CRayGrid::InitRayVectorFromRayMatrix()
// --- PUBLIC ---
// --------------
#pragma region Public
CRayGrid CRayGrid::GetNeighboringRays(const std::shared_ptr<CRay>& pRay) const
CRayGrid CRayGrid::GetSurroundingGrid(const std::shared_ptr<CRay>& pRay) const
{
if (!Contains(pRay))
return CRayGrid();
......@@ -112,9 +112,9 @@ CRayGrid CRayGrid::GetNeighboringRays(const std::shared_ptr<CRay>& pRay) const
return CRayGrid(newRayMatrix, newThetaDeg, newPhiDeg, newGridHasCircularPhi);
}
void CRayGrid::SetToNeighboringRays(const std::shared_ptr<CRay>& pRay)
void CRayGrid::SetToSurroundingGrid(const std::shared_ptr<CRay>& pRay)
{
*this = GetNeighboringRays(pRay);
*this = GetSurroundingGrid(pRay);
}
CRayGrid CRayGrid::CopyWithNewRays() const
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment