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

ART - RayGrid

- added function to get circular bool
- fixed bug that occured erasing last element in angle vector
parent 85fadac9
......@@ -94,6 +94,8 @@ namespace ITAPropagationPathSim
bool IsPoleDirection(const double& thetaDeg) const;
bool HasPoleDirection(const std::shared_ptr<CRay>& pRay) const;
public:
//! Returns true if the phi angles are defined circular (covering a full circle)
inline bool IsCircular() const { return bCircularPhi; }
bool IsEmpty() const;
bool Contains(const std::shared_ptr<CRay>& pRay) const;
......
......@@ -236,7 +236,7 @@ void CRayGrid::GetNeighboringAngleIndices(const std::shared_ptr<CRay>& pRay, std
if (thetaIdxVec.front() < 0)
thetaIdxVec.erase(thetaIdxVec.begin());
if (thetaIdxVec.back() >= NTheta())
thetaIdxVec.erase(thetaIdxVec.end());
thetaIdxVec.pop_back();
if (HasPoleDirection(pRay))
......@@ -250,7 +250,7 @@ void CRayGrid::GetNeighboringAngleIndices(const std::shared_ptr<CRay>& pRay, std
if (phiIdxVec.front() < 0)
phiIdxVec.erase(phiIdxVec.begin());
if (phiIdxVec.back() >= NPhi())
phiIdxVec.erase(phiIdxVec.end());
phiIdxVec.pop_back();
}
}
#pragma endregion
......
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