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

Atmospheric Ray Tracing - RayResolutionAdapter

- added function to get new rays of last adaptation
parent d44525ab
......@@ -10,7 +10,7 @@ using namespace ITAPropagationPathSim::AtmosphericRayTracing;
bool Simulation::CRayResolutionAdapter::ZoomIntoRay(std::shared_ptr<CRay> pRay)
{
vpInsertedRays.clear();
vpNewRaysOfLastAdaptation.clear();
if(!Contains(pRay))
return false;
......@@ -32,7 +32,7 @@ void Simulation::CRayResolutionAdapter::DoubleRayResolution()
vdPhiDeg = DoubleAngularResolution(vdPhiDeg);
RayMatrix newRayMatrix;
vpInsertedRays.clear();
vpNewRaysOfLastAdaptation.clear();
RayVector::const_iterator iteratorOldRays = ConstRayVectorReference().cbegin();
for (int idxTheta = 0; idxTheta < vdThetaDeg.size(); idxTheta++)
{
......@@ -45,7 +45,7 @@ void Simulation::CRayResolutionAdapter::DoubleRayResolution()
if (isNewTheta || isNewPhi)
{
pRay = std::make_shared<CRay>(v3SourcePos, vdThetaDeg[idxTheta], vdPhiDeg[idxPhi]);
vpInsertedRays.push_back(pRay);
vpNewRaysOfLastAdaptation.push_back(pRay);
}
else
pRay = *iteratorOldRays++;
......
......@@ -31,11 +31,13 @@ namespace ITAPropagationPathSim
class CRayResolutionAdapter : public CRayGrid
{
private:
std::vector< std::shared_ptr<CRay> > vpInsertedRays;
std::vector< std::shared_ptr<CRay> > vpNewRaysOfLastAdaptation;
public:
CRayResolutionAdapter(const CRayGrid& rayGrid) : CRayGrid(rayGrid) {}
public:
std::vector< std::shared_ptr<CRay> > NewRaysOfLastAdaptation() { return vpNewRaysOfLastAdaptation; }
bool ZoomIntoRay(std::shared_ptr<CRay> pRay);
private:
......
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