Commit 58bf53ca authored by Armin Erraji's avatar Armin Erraji

Added calculation of diffraction angle in ITAGeoUtils.

parent 97346636
......@@ -105,6 +105,9 @@ namespace ITAGeoUtils
*/
ITA_GEO_API bool IsDiffractionAperturePointInRange( const VistaVector3D& v3StartVertex, const VistaVector3D& v3EndVertex, const VistaVector3D& v3PointOnEdge );
//! Calculates the diffraction angle
ITA_GEO_API bool CalculateDiffractionAngle(const VistaVector3D& v3StartPoint, const VistaVector3D& v3AperturePoint, const VistaVector3D& v3EndPoint, float& dAngle);
//! Calculates the aperture point on an finite wedge and returns true if within bounds
/**
* @param[out] v3AperturePoint
......
......@@ -558,6 +558,16 @@ bool ITAGeoUtils::IsDiffractionAperturePointInRange( const VistaVector3D& v3Star
return false;
}
bool ITAGeoUtils::CalculateDiffractionAngle(const VistaVector3D & v3StartPoint, const VistaVector3D & v3AperturePoint, const VistaVector3D & v3EndPoint, float & dAngle)
{
VistaVector3D v3StartToApexDir = (v3AperturePoint - v3StartPoint).GetNormalized();
VistaVector3D v3ApexToEndDir = (v3EndPoint - v3AperturePoint).GetNormalized();
dAngle = acos(v3StartToApexDir * v3ApexToEndDir);
return true;
}
bool ITAGeoUtils::RojectPoint( const VistaVector3D& v3VertexStart, const VistaVector3D& v3VertexEnd, const VistaVector3D& v3TargetPlaneNormal, const VistaVector3D& v3AnyPoint, VistaVector3D& v3RojectedPoint )
{
// Algorithm A: use closest point on planes, check and correct amibuity and scale for constant Euklidean distance
......@@ -613,6 +623,7 @@ bool ITAGeoUtils::RojectPoint( const VistaVector3D& v3VertexStart, const VistaVe
*/
}
unsigned long int ITAGeoUtils::CalculateNumberOfImages( const int iFaceCount, const int iOrder )
{
if( iOrder <= 0 )
......
Markdown is supported
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