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

ART - Rays

- added functions to store spreading loss and read
parent fd64e3a5
......@@ -57,7 +57,7 @@ namespace ITAPropagationPathSim
VistaVector3D posMinDist;
inline CRayReceiverData() : idxMinDist(-1), distance(-1), reflectionOrder(-1), posMinDist(VistaVector3D()) {}
inline CRayReceiverData(const int iMin, const float dMin, const int reflOrder, const VistaVector3D& rMin = VistaVector3D()) : idxMinDist(iMin), distance(dMin), reflectionOrder(reflOrder), posMinDist(rMin) {}
inline CRayReceiverData(int iMin, float dMin, int reflOrder, const VistaVector3D& rMin = VistaVector3D()) : idxMinDist(iMin), distance(dMin), reflectionOrder(reflOrder), posMinDist(rMin) {}
};
class ITA_PROPAGATION_PATH_SIM_API CRay : public std::vector<CRayElement>
......@@ -65,6 +65,7 @@ namespace ITAPropagationPathSim
private:
std::vector<int> iReflectionIndices;
double dSpreadingLoss = -1; //!< Spreadingloss at last point of ray (receiver), calculated at the end of Eigenray search.
typedef const VistaVector3D* ReceiverPositionPtr;
typedef std::map<ReceiverPositionPtr, CRayReceiverData> ReceiverDistanceMap;
......@@ -90,12 +91,16 @@ namespace ITAPropagationPathSim
int ReflectionOrder() const { return iReflectionIndices.size(); }
//! Returns the reflection order of the ray element with given index
int ReflectionOrder(const int idx) const;
//! Returns the spreading loss at end point of receiver. If this has not been calculated yet, this returns -1.
inline double SpreadingLoss() const { return dSpreadingLoss; }
#pragma endregion
//! Appends a new element with position, wavefront normal and timestamp to the ray
void Append(const VistaVector3D& position, const VistaVector3D& wavefrontNormal, const double& timeStamp);
//! Appends a new element to the ray and adds its index to iReflectionIndices
void AppendReflection(const VistaVector3D& position, const VistaVector3D& wavefrontNormal, const double& timeStamp);
inline void SetSpreadingLoss(const double& spreadingLoss) { dSpreadingLoss = spreadingLoss; }
//! Returns true, if both rays have the same initial direction
bool SameDirection(const CRay& other) 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