Commit 6f9e088b authored by Armin Erraji's avatar Armin Erraji

Merge branch 'ma_2018/erraji' of...

Merge branch 'ma_2018/erraji' of https://git.rwth-aachen.de/ita/ITAPropagationPathSim into ma_2018/erraji
parents fb8e1e96 df240cda
......@@ -178,7 +178,7 @@ namespace ITAPropagationPathSim
map <UrbanEdgeHandle, map <UrbanEdgeHandle, double>> m_mdApertureStartDifferenceMap;
//RTree of building meshes
shared_ptr<ITAGeo::Urban::RTree::CShapesTree> m_pBuildingsTree;
shared_ptr<ITAGeo::Urban::RTree::CBuildings> m_pBuildingsTree;
//Matrix of illumination of diffraction edges
map<UrbanEdgeHandle, set<shared_ptr<DiffractionEdge>>> m_mDiffractionMatrix;
......
......@@ -172,6 +172,7 @@ void CSource::ConstructReflectionsPath(CImageNode* pNode, std::shared_ptr< const
//Set reflection anchor at intersection point
std::shared_ptr< ITAGeo::CSpecularReflection > pReflectionAnchor = std::make_shared < ITAGeo::CSpecularReflection >();
pReflectionAnchor->v3InteractionPoint = v3IntersectionPoint;
pReflectionAnchor->v3FaceNormal = pNode->pImage->v3MirrorNormal;
//Add reflection to path
oPath[pNode->pImage->iOrder] = pReflectionAnchor;
......
......@@ -445,6 +445,7 @@ void ITAPropagationPathSim::CombinedModel::CPathEngine::ConvertShapeListsToPropa
//Create specular reflection anchor
shared_ptr<CSpecularReflection> pReflectionAnchor = make_shared<CSpecularReflection>();
pReflectionAnchor->v3InteractionPoint = *pFace->v3InteractionPoint;
pReflectionAnchor->v3FaceNormal = pFace->pPlane->GetNormVector();
oPath.push_back(pReflectionAnchor);
break;
......@@ -1286,11 +1287,15 @@ void ITAPropagationPathSim::CombinedModel::CPathEngine::ConstructPropagationShap
//Set boundary sphere
pPropagationEdge->SetBoundarySphere();
//Set face normals
pPropagationEdge->hMainFace = hMainFace;
pPropagationEdge->hOppositeFace = hOppositeFace;
pPropagationEdge->v3MainFaceNormal = make_shared<VistaVector3D>(v3MainFaceNormal.data());
pPropagationEdge->v3OppositeFaceNormal = make_shared<VistaVector3D>(v3OppositeFaceNormal.data());
//Set face normals, if possible
pPropagationEdge->hMainFace = pMesh->face_handle( pPropagationEdge->hHalfedge );
pPropagationEdge->v3MainFaceNormal = make_shared<VistaVector3D>( pMesh->calc_face_normal( pPropagationEdge->hMainFace ).data() );
pPropagationEdge->hOppositeFace = pMesh->opposite_face_handle(pPropagationEdge->hHalfedge);
if( !pPropagationEdge->hOppositeFace.is_valid() )
continue;
else
pPropagationEdge->v3OppositeFaceNormal = make_shared<VistaVector3D>( pMesh->calc_face_normal( pPropagationEdge->hOppositeFace ).data() );
m_vpPropagationShapes.push_back(pPropagationEdge);
}
......
......@@ -225,6 +225,7 @@ void CEngine::ConstructReflectionsPath(CImageNode* pNode, std::shared_ptr< const
//Set reflection anchor at intersection point
std::shared_ptr< ITAGeo::CSpecularReflection > pReflectionAnchor = std::make_shared < ITAGeo::CSpecularReflection >();
pReflectionAnchor->v3InteractionPoint = v3IntersectionPoint;
pReflectionAnchor->v3FaceNormal = pNode->pImage->v3MirrorNormal;
//Add reflection to path
oPath[pNode->pImage->iOrder] = pReflectionAnchor;
......
#include <ITAGeo/Base.h>
#include <ITAPropagationPathSim/UrbanEngine/UrbanDiffraction.h>
......@@ -41,14 +42,14 @@ CDiffractionPath::CDiffractionPath(ITAGeo::Urban::CModel & oUrbanModel, const in
}
//Add buildings tree for faster filtering of illuminable building meshes
m_pBuildingsTree = make_shared<ITAGeo::Urban::RTree::CShapesTree>();
m_pBuildingsTree = make_shared<ITAGeo::Urban::RTree::CBuildings>();
m_pBuildingsTree->Create(pBuildings);
//Construct diffraction matrix
ConstructDiffractionMatrix();
}
void CDiffractionPath::ConstructDiffractionPaths(shared_ptr<CPropagationAnchor> pReceiverAnchor, CPropagationPathList & oPathList)
void CDiffractionPath::ConstructDiffractionPaths(shared_ptr<ITAGeo::CPropagationAnchor> pReceiverAnchor, CPropagationPathList & oPathList)
{
//Set destination anchor
m_pDestinationAnchor = pReceiverAnchor;
......
......@@ -190,6 +190,7 @@ void CSource::ConstructReflectionsPath(CImageNode* pNode, std::shared_ptr< const
//Set reflection anchor at intersection point
std::shared_ptr< ITAGeo::CSpecularReflection > pReflectionAnchor = std::make_shared < ITAGeo::CSpecularReflection >();
pReflectionAnchor->v3InteractionPoint = v3IntersectionPoint;
pReflectionAnchor->v3FaceNormal = pNode->pImage->v3MirrorNormal;
//Add reflection to path
oPath[pNode->pImage->iOrder] = pReflectionAnchor;
......
......@@ -40,7 +40,7 @@ using namespace ITAPropagationPathSim;
int main(int iNumInArgs, char* pcInArgs[])
{
string sSubFolder = "M:/Sciebo/2018 MA - Armin Erraji/Tests/StreetThreeBuildings/";
string sSubFolder = "D:/Users/stienen/Sciebo/2018 MA - Armin Erraji/Tests/StreetThreeBuildings/";
//string sSubFolder = "SketchUpFiles/";
string sInFile = "Test.skp";
......@@ -318,7 +318,7 @@ int main(int iNumInArgs, char* pcInArgs[])
oGeoModel.AddPropagationPathVisualization(oPath, sPathName);
}
//oPathListVisible.Store("CombinedModelTest_" + sInFile + ".json");
oPathList.Store("CombinedModelTest_" + sInFile + ".json");
oGeoModel.Store(sSubFolder +"CombinedModelTest_"+ sInFile);
......
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