Adding JSON reflection plane normal export for prop paths and fixing some...

Adding JSON reflection plane normal export for prop paths and fixing some class related stuff in engine
parent 7fbe9d9c
......@@ -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;
......
......@@ -424,6 +424,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;
......
......@@ -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;
......
......@@ -36,7 +36,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";
......@@ -239,7 +239,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