Commit 9febe15b authored by Armin Erraji's avatar Armin Erraji

Added CombinatedModelTest functionality and small bugfixes in PropagationEngine

parent de235e87
#include<ITAPropagationPathSim/CombinationalEngine/PropagationShapes.h>
#include<ITAPropagationPathSim/CombinatedModel/PropagationShapes.h>
// ITA includes
#include <ITAGeo/Base.h>
......@@ -7,20 +7,19 @@
namespace ITAPropagationPathSim
{
namespace CombinationalEngine
namespace CombinatedModel
{
using namespace ITAGeo;
class PathConstruct
class ITA_PROPAGATION_PATH_SIM_API CPathEngine
{
public:
//Constructor
PathConstruct(shared_ptr<const ITAGeo::Halfedge::CMeshModelList> pMeshModelList);
CPathEngine(shared_ptr<const ITAGeo::Halfedge::CMeshModelList> pMeshModelList);
void CreatePropagationTree(shared_ptr<const CEmitter> pEmitter, const int iMaxDiffractions = DiffractionOrder::DIFFRACTION_ORDER_2,const int iMaxReflections = ReflectionOrder::SPECULAR_REFLECTION_ORDER_2, const int iMaxCombinedOrder = Order::ORDER_3);
void RecursiveAddChildrenToTree(const CPropagationShapeShared & pPropagationShapeChildIn, CPropagationShapeShared& vpShapeChildCopyOut, int iReflectionOrder, int iDiffractionOrder, int iCombinedOrder);
private:
......@@ -36,11 +35,12 @@ namespace ITAPropagationPathSim
void CreateVisibilityMap();
bool CanPointIlluminateFace(const VistaVector3D & v3Point, const string & sMeshModelName, CITAMesh::FaceHandle hFace);
void CanEdgeIlluminateFace(bool & bCanEdgeIlluminateFaceOut, ITAPropagationPathSim::CombinationalEngine::CPropagationFaceShared & pPropagationFace, ITAPropagationPathSim::CombinationalEngine::CPropagationEdgeShared & pPropagationEdge);
void CanEdgeIlluminateFace(bool & bCanEdgeIlluminateFaceOut, ITAPropagationPathSim::CombinatedModel::CPropagationFaceShared & pPropagationFace, ITAPropagationPathSim::CombinatedModel::CPropagationEdgeShared & pPropagationEdge);
void CanFaceIlluminateEdge(bool & bCanFaceIlluminateEdgeOut, CPropagationFaceShared & pPropagationFace, CPropagationEdgeShared & pPropagationEdge);
void CanFaceIlluminateFace(bool & bCanFaceIlluminateFaceOut, CPropagationFaceShared & pPropagationFaceStart, CPropagationFaceShared & pPropagationFaceEnd);
void CanEdgeIlluminateEdge(bool & bCanEdgeIlluminateEdgeOut, CPropagationEdgeShared & pPropagationEdgeStart, CPropagationEdgeShared & pPropagationEdgeEnd);
void GetPropagationShapes(std::vector<ITAPropagationPathSim::CombinationalEngine::CPropagationShapeShared> &vpPropagationShapes);
void GetPropagationShapes();
void RecursiveAddChildrenToTree(const CPropagationShapeShared & pPropagationShapeChildIn, CPropagationShapeShared& vpShapeChildCopyOut, int iReflectionOrder, int iDiffractionOrder, int iCombinedOrder);
};
}
......
......@@ -11,7 +11,7 @@ using namespace std;
namespace ITAPropagationPathSim
{
namespace CombinationalEngine
namespace CombinatedModel
{
// Typedefs
class CPropagationShape;
......
#include <ITAPropagationPathSim\CombinationalEngine\PropagationBase.h>
#include <ITAPropagationPathSim\CombinatedModel\PropagationEngine.h>
//Typedefs
typedef OpenMesh::PolyMesh_ArrayKernelT<> CITAMesh;
......@@ -7,7 +7,7 @@ struct CITAMeshPtr
CITAMesh* pMesh;
};
ITAPropagationPathSim::CombinationalEngine::PathConstruct::PathConstruct(shared_ptr<const ITAGeo::Halfedge::CMeshModelList> pMeshModelList)
ITAPropagationPathSim::CombinatedModel::CPathEngine::CPathEngine(shared_ptr<const ITAGeo::Halfedge::CMeshModelList> pMeshModelList)
{
m_pMeshModelList = pMeshModelList;
......@@ -25,7 +25,7 @@ ITAPropagationPathSim::CombinationalEngine::PathConstruct::PathConstruct(shared_
CreateVisibilityMap();
}
void ITAPropagationPathSim::CombinationalEngine::PathConstruct::CreatePropagationTree(shared_ptr<const ITAGeo::CEmitter> pEmitter, const int iMaxDiffractions, const int iMaxReflections, const int iMaxCombinedOrder)
void ITAPropagationPathSim::CombinatedModel::CPathEngine::CreatePropagationTree(shared_ptr<const ITAGeo::CEmitter> pEmitter, const int iMaxDiffractions, const int iMaxReflections, const int iMaxCombinedOrder)
{
//Set emitter
m_pEmitter = pEmitter;
......@@ -50,7 +50,7 @@ void ITAPropagationPathSim::CombinationalEngine::PathConstruct::CreatePropagatio
//Only add reflection paths if iMaxReflections is at least one
if (iMaxReflections >= 1 )
{
CPropagationFaceShared pFaceCopy;
CPropagationFaceShared pFaceCopy = make_shared<CPropagationFace>();
pFaceCopy->CopyFrom(*static_pointer_cast<CPropagationFace>(pPropagationShape));
bool bCanIlluminated = CanPointIlluminateFace(m_pEmitter->v3InteractionPoint, *pFaceCopy->sMeshModelName, pFaceCopy->hFace);
......@@ -83,12 +83,9 @@ void ITAPropagationPathSim::CombinationalEngine::PathConstruct::CreatePropagatio
//Only add reflection paths if iMaxDiffractions is at least one
if (iMaxDiffractions >= 1)
{
CPropagationEdgeShared pEdgeCopy;
CPropagationEdgeShared pEdgeCopy = make_shared<CPropagationEdge>();
pEdgeCopy->CopyFrom(*static_pointer_cast<CPropagationEdge>(pPropagationShape));
ITA_EXCEPT_NOT_IMPLEMENTED;
m_vpPropagationTree.push_back(pEdgeCopy);
bool bCanIlluminated = CanPointIlluminateFace(m_pEmitter->v3InteractionPoint, *pEdgeCopy->sMeshModelName, pEdgeCopy->hMainFace);
bCanIlluminated =bCanIlluminated || CanPointIlluminateFace(m_pEmitter->v3InteractionPoint, *pEdgeCopy->sMeshModelName, pEdgeCopy->hOppositeFace);
if (bCanIlluminated)
......@@ -119,7 +116,7 @@ void ITAPropagationPathSim::CombinationalEngine::PathConstruct::CreatePropagatio
}
}
void ITAPropagationPathSim::CombinationalEngine::PathConstruct::RecursiveAddChildrenToTree(const CPropagationShapeShared & pPropagationShapeChildIn, CPropagationShapeShared& vpShapeChildCopyOut, int iReflectionOrder, int iDiffractionOrder, int iCombinedOrder)
void ITAPropagationPathSim::CombinatedModel::CPathEngine::RecursiveAddChildrenToTree(const CPropagationShapeShared & pPropagationShapeChildIn, CPropagationShapeShared& vpShapeChildCopyOut, int iReflectionOrder, int iDiffractionOrder, int iCombinedOrder)
{
switch (pPropagationShapeChildIn->iShapeType)
......@@ -130,7 +127,7 @@ void ITAPropagationPathSim::CombinationalEngine::PathConstruct::RecursiveAddChil
if (iReflectionOrder < *m_pMaxReflectionOrder)
{
//Cast shape as face and copy shape
CPropagationFaceShared pFaceChildCopy;
CPropagationFaceShared pFaceChildCopy = make_shared<CPropagationFace>();
pFaceChildCopy->CopyFrom(*static_pointer_cast<CPropagationFace>(pPropagationShapeChildIn));
//Set output parameter
......@@ -153,7 +150,6 @@ void ITAPropagationPathSim::CombinationalEngine::PathConstruct::RecursiveAddChil
}
}
break;
}
case CPropagationShape::EDGE:
{
......@@ -161,7 +157,7 @@ void ITAPropagationPathSim::CombinationalEngine::PathConstruct::RecursiveAddChil
if (iDiffractionOrder < *m_pMaxDiffractionOrder)
{
//Cast shape as edge and copy shape
CPropagationEdgeShared pEdgeChildCopy;
CPropagationEdgeShared pEdgeChildCopy = make_shared<CPropagationEdge>();
pEdgeChildCopy->CopyFrom(*static_pointer_cast<CPropagationEdge>(pPropagationShapeChildIn));
//Set output parameter
......@@ -190,19 +186,17 @@ void ITAPropagationPathSim::CombinationalEngine::PathConstruct::RecursiveAddChil
void ITAPropagationPathSim::CombinationalEngine::PathConstruct::CreateVisibilityMap()
void ITAPropagationPathSim::CombinatedModel::CPathEngine::CreateVisibilityMap()
{
vector<CPropagationShapeShared> vpPropagationShapes;
//Get all propagation shapes of the mesh model list
GetPropagationShapes(vpPropagationShapes);
GetPropagationShapes();
//Create a visibility map
for (auto& pPropagationShapeFrom : vpPropagationShapes)
for (auto& pPropagationShapeFrom : m_vpPropagationShapes)
{
for (auto& pPropagationShapeTo : vpPropagationShapes)
for (auto& pPropagationShapeTo : m_vpPropagationShapes)
{
if (pPropagationShapeFrom == pPropagationShapeTo)
continue;
......@@ -267,14 +261,14 @@ void ITAPropagationPathSim::CombinationalEngine::PathConstruct::CreateVisibility
}
}
bool ITAPropagationPathSim::CombinationalEngine::PathConstruct::CanPointIlluminateFace(const VistaVector3D& v3Point, const string& sMeshModelName, CITAMesh::FaceHandle hFace)
bool ITAPropagationPathSim::CombinatedModel::CPathEngine::CanPointIlluminateFace(const VistaVector3D& v3Point, const string& sMeshModelName, CITAMesh::FaceHandle hFace)
{
auto& pFaceMesh = m_pMeshModelList->GetMeshModel(sMeshModelName)->GetMesh()->pMesh;
return ITAGeoUtils::CanFaceBeIlluminated(*pFaceMesh, hFace, v3Point);
}
void ITAPropagationPathSim::CombinationalEngine::PathConstruct::CanEdgeIlluminateFace(bool &bCanEdgeIlluminateFaceOut, CPropagationFaceShared & pPropagationFace, CPropagationEdgeShared & pPropagationEdge)
void ITAPropagationPathSim::CombinatedModel::CPathEngine::CanEdgeIlluminateFace(bool &bCanEdgeIlluminateFaceOut, CPropagationFaceShared & pPropagationFace, CPropagationEdgeShared & pPropagationEdge)
{
auto& pFaceMesh = m_pMeshModelList->GetMeshModel(*pPropagationFace->sMeshModelName)->GetMesh()->pMesh;
......@@ -282,7 +276,7 @@ void ITAPropagationPathSim::CombinationalEngine::PathConstruct::CanEdgeIlluminat
bCanEdgeIlluminateFaceOut |= ITAGeoUtils::CanFaceBeIlluminated(*pFaceMesh, pPropagationFace->hFace, *pPropagationEdge->v3ToVertex);
}
void ITAPropagationPathSim::CombinationalEngine::PathConstruct::CanFaceIlluminateEdge(bool &bCanFaceIlluminateEdgeOut, CPropagationFaceShared & pPropagationFace, CPropagationEdgeShared & pPropagationEdge)
void ITAPropagationPathSim::CombinatedModel::CPathEngine::CanFaceIlluminateEdge(bool &bCanFaceIlluminateEdgeOut, CPropagationFaceShared & pPropagationFace, CPropagationEdgeShared & pPropagationEdge)
{
auto& pEdgeMesh = m_pMeshModelList->GetMeshModel(*pPropagationEdge->sMeshModelName)->GetMesh()->pMesh;
......@@ -298,7 +292,7 @@ void ITAPropagationPathSim::CombinationalEngine::PathConstruct::CanFaceIlluminat
}
}
void ITAPropagationPathSim::CombinationalEngine::PathConstruct::CanFaceIlluminateFace(bool &bCanFaceIlluminateFaceOut, CPropagationFaceShared & pPropagationFaceStart, CPropagationFaceShared & pPropagationFaceEnd)
void ITAPropagationPathSim::CombinatedModel::CPathEngine::CanFaceIlluminateFace(bool &bCanFaceIlluminateFaceOut, CPropagationFaceShared & pPropagationFaceStart, CPropagationFaceShared & pPropagationFaceEnd)
{
auto& pFaceEndMesh = m_pMeshModelList->GetMeshModel(*pPropagationFaceEnd->sMeshModelName)->GetMesh()->pMesh;
......@@ -313,7 +307,7 @@ void ITAPropagationPathSim::CombinationalEngine::PathConstruct::CanFaceIlluminat
}
}
void ITAPropagationPathSim::CombinationalEngine::PathConstruct::CanEdgeIlluminateEdge(bool &bCanEdgeIlluminateEdgeOut, CPropagationEdgeShared & pPropagationEdgeStart, CPropagationEdgeShared & pPropagationEdgeEnd)
void ITAPropagationPathSim::CombinatedModel::CPathEngine::CanEdgeIlluminateEdge(bool &bCanEdgeIlluminateEdgeOut, CPropagationEdgeShared & pPropagationEdgeStart, CPropagationEdgeShared & pPropagationEdgeEnd)
{
auto& pEdgeEndMesh = m_pMeshModelList->GetMeshModel(*pPropagationEdgeEnd->sMeshModelName)->GetMesh()->pMesh;
......@@ -323,7 +317,7 @@ void ITAPropagationPathSim::CombinationalEngine::PathConstruct::CanEdgeIlluminat
bCanEdgeIlluminateEdgeOut |= ITAGeoUtils::CanFaceBeIlluminated(*pEdgeEndMesh, pPropagationEdgeEnd->hOppositeFace, *pPropagationEdgeStart->v3ToVertex);
}
void ITAPropagationPathSim::CombinationalEngine::PathConstruct::GetPropagationShapes(vector<CPropagationShapeShared> &vpPropagationShapesOut)
void ITAPropagationPathSim::CombinatedModel::CPathEngine::GetPropagationShapes()
{
for (auto& pMeshModel : *m_pMeshModelList)
......@@ -354,7 +348,7 @@ void ITAPropagationPathSim::CombinationalEngine::PathConstruct::GetPropagationSh
}
vpPropagationShapesOut.push_back(pPropagationFace);
m_vpPropagationShapes.push_back(pPropagationFace);
}
//Iterate over all edges of current mesh
......@@ -382,7 +376,7 @@ void ITAPropagationPathSim::CombinationalEngine::PathConstruct::GetPropagationSh
pPropagationEdge->v3MainFaceNormal = make_shared<VistaVector3D>(pMesh->calc_face_normal(pPropagationEdge->hMainFace).data());
pPropagationEdge->v3OppositeFaceNormal = make_shared<VistaVector3D>(pMesh->calc_face_normal(pPropagationEdge->hOppositeFace).data());
vpPropagationShapesOut.push_back(pPropagationEdge);
m_vpPropagationShapes.push_back(pPropagationEdge);
}
}
......
#include <ITAPropagationPathSim/CombinationalEngine/PropagationShapes.h>
#include <ITAPropagationPathSim/CombinatedModel/PropagationShapes.h>
using namespace ITAPropagationPathSim::CombinationalEngine;
using namespace ITAPropagationPathSim::CombinatedModel;
void CPropagationShape::CopyFrom(const CPropagationShape & oPropagationShapeIn)
......@@ -19,6 +19,7 @@ void CPropagationFace::CopyFrom(const CPropagationFace & oPropagationFaceIn)
CPropagationShape::CopyFrom(oPropagationFaceIn);
hFace = oPropagationFaceIn.hFace;
vv3Vertices = oPropagationFaceIn.vv3Vertices;
v3ImageSource = oPropagationFaceIn.v3ImageSource;
v3ImageReceiver = oPropagationFaceIn.v3ImageReceiver;
......@@ -31,6 +32,8 @@ void CPropagationEdge::CopyFrom(const CPropagationEdge & oPropagationEdgeIn)
hHalfedge = oPropagationEdgeIn.hHalfedge;
hEdge = oPropagationEdgeIn.hEdge;
hMainFace = oPropagationEdgeIn.hMainFace;
hOppositeFace = oPropagationEdgeIn.hOppositeFace;
v3FromVertex = oPropagationEdgeIn.v3FromVertex;
v3ToVertex = oPropagationEdgeIn.v3ToVertex;
v3MainFaceNormal = oPropagationEdgeIn.v3MainFaceNormal;
......
......@@ -21,7 +21,7 @@
#include <ITAStopWatch.h>
#include <ITAStringUtils.h>
#include <ITAPropagationPathSim//MirrorImage/Engine.h>
#include <ITAPropagationPathSim/CombinatedModel/PropagationEngine.h>
#include <ITAGeo/Base.h>
#include <ITAGeo/Utils.h>
#include <ITAGeo/SketchUp/Model.h>
......@@ -39,17 +39,20 @@ int main( int iNumInArgs, char* pcInArgs[] )
string sSubFolder = "SketchUpFiles/";
//string sInFile = "NonSimpleRoom - Outside.skp";
string sInFile = "SimpleRoom.skp";
string sInFile = "SimpleUrbanEnvironment.skp";
if( iNumInArgs > 1 )
sInFile = string( pcInArgs[ 1 ] );
CMaterialDirectory oMaterialDir( "./" );
//Load geo model(for later saving of the propagation paths)
SketchUp::CModel oGeoModel;
oGeoModel.SetMaterialManager( &oMaterialDir );
if( oGeoModel.Load(sSubFolder + sInFile ) )
{
cout << "Succesffully loaded '" << sInFile << "'" << endl;
cout << "Successfully loaded '" << sInFile << "'" << endl;
}
else
{
......@@ -57,244 +60,37 @@ int main( int iNumInArgs, char* pcInArgs[] )
return 255;
}
//oGeoModel.TriangulateMeshes();
//auto pSensor = make_shared< CSensor >(VistaVector3D(-3.0f, -3.3f, 2.3f));
auto pSensor = make_shared< CSensor >( VistaVector3D( 3.0f, 3.3f, 1.3f ) );
auto pEmitter = make_shared< CEmitter >( VistaVector3D( 2.1f, 2.2f, 1.7f ) );
cout << "Emitter: " << pEmitter->vPos << endl;
cout << "Sensor: " << pSensor->vPos << endl;
VistaVector3D v3BBMin, v3BBMax;
oGeoModel.GetTopLevelMesh()->GetBoundingBoxAxisAligned( v3BBMin, v3BBMax );
cout << "Bounding box lower corner: " << v3BBMin << endl;
cout << "Bounding box upper corner: " << v3BBMax << endl;
if( oGeoModel.GetTopLevelMesh()->GetInsideBoundingBoxAxisAligned( pEmitter->v3InteractionPoint ) )
cout << "Emitter inside axis-aligned bounding box" << endl;
else
cout << "Emitter outside axis-aligned bounding box!" << endl;
if( oGeoModel.GetTopLevelMesh()->GetInsideBoundingBoxAxisAligned( pSensor->v3InteractionPoint ) )
cout << "Sensor inside axis-aligned bounding box" << endl;
else
cout << "Sensor outside axis-aligned bounding box!" << endl;
VistaVector3D v3SBCentroid; float fSBRadius;
oGeoModel.GetTopLevelMesh()->GetBoundingSphere( v3SBCentroid, fSBRadius );
cout << "Bounding sphere centroid: " << v3SBCentroid << endl;
cout << "Bounding sphere radius: " << fSBRadius << endl;
if( oGeoModel.GetTopLevelMesh()->GetInsideBoundingSphere( pEmitter->v3InteractionPoint ) )
cout << "Emitter inside bounding sphere" << endl;
else
cout << "Emitter outside bounding sphere!" << endl;
if( oGeoModel.GetTopLevelMesh()->GetInsideBoundingSphere( pSensor->v3InteractionPoint ) )
cout << "Sensor inside bounding sphere" << endl;
else
cout << "Sensor outside bounding sphere!" << endl;
oGeoModel.GetTopLevelMesh()->GetInsideBoundingBoxAxisAligned( pEmitter->v3InteractionPoint );
const ITAGeo::Halfedge::CMeshModel& oModelRef( *( oGeoModel.GetTopLevelMesh() ) );
MirrorImage::CEngine oISEngine( oModelRef, ITAGeo::ORDER_3 );
oISEngine.ConstructImages( pEmitter );
cout << "Simple image model engine constructed " << oISEngine.GetNumberOfImages() << " images" << endl;
cout << "Number of images: " << oISEngine.GetNumberOfImages() << endl;
#if 0
CPropagationPathList lImagesViz;
oISEngine.GetImageVisualizationPaths( lImagesViz );
for( auto p : lImagesViz )
oGeoModel.AddPropagationPathVisualization( p, "MIM_AllImages" );
#endif
#if 0
CPropagationPathList lImagesHedgehogViz;
oISEngine.GetImagesHedgehogVisualization( lImagesHedgehogViz, pSensor );
for( auto p : lImagesHedgehogViz )
oGeoModel.AddPropagationPathVisualization( p, "MIM_ImagesHedgehog" );
#endif
#if 0
int iMaxOrder = ITAGeo::ORDER_2;
for( int n = 0; n < iMaxOrder; n++ )
{
CPropagationPathList lPropagationPaths;
oISEngine.GetAudiblePaths( pSensor, lPropagationPaths, n );
cout << "Found " << lPropagationPaths.size() << " audible images for order " << n << endl;
for( auto path : lPropagationPaths )
{
assert( path.size() > 1 && path.size() <= n + 2 );
oGeoModel.AddPropagationPathVisualization( path, "MIM_Paths_EO" + std::to_string( n ) );
}
}
#endif
#if 0
CPropagationPathList lDirectPath;
oISEngine.GetAudiblePathsForOrder( pSensor, lDirectPath, ITAGeo::ORDER_0 );
assert( lDirectPath.size() <= 1 );
for( auto path : lDirectPath )
{
assert( path.size() == 2 );
oGeoModel.AddPropagationPathVisualization( path, "MIM_Path_Direct" );
}
#endif
#if 0
CPropagationPathList lISFirstOrder;
oISEngine.GetAudiblePathsForOrder( pSensor, lISFirstOrder, ITAGeo::ORDER_1 );
for( auto path : lISFirstOrder )
{
assert( path.size() == ITAGeo::ORDER_1 + 2 );
oGeoModel.AddPropagationPathVisualization( path, "MIM_Path_ORDER_1" );
}
#endif
//Load mesh model list
auto pMeshModelList = make_shared< ITAGeo::Halfedge::CMeshModelList>();
pMeshModelList->SetMaterialManager(&oMaterialDir);
#if 0
CPropagationPathList lISSecondOrder;
oISEngine.GetAudiblePathsForOrder( pSensor, lISSecondOrder, ITAGeo::ORDER_2 );
for( auto path : lISSecondOrder )
{
assert( path.size() == ITAGeo::ORDER_2 + 2 );
oGeoModel.AddPropagationPathVisualization( path, "MIM_Path_ORDER_2" );
}
#endif
#if 1
CPropagationPathList pathList;
ITAStopWatch sw; sw.start();
if (oGeoModel.GetTopLevelMesh()->GetInsideMeshJordanMethodAxisAligned(pSensor->vPos))
oISEngine.ConstructReflectionPathsInsideForOrder(pSensor, pathList, ITAGeo::ORDER_0);
else
oISEngine.ConstructReflectionPathsOutsideForOrder(pSensor, pathList, ITAGeo::ORDER_0);
cout << "Calculation time direct path: " << timeToString(sw.stop()) << endl;
string layerName = "Refl_Path_ORDER_0_NUMBER_" + to_string(pathList.GetNumPaths());
for (auto path : pathList)
if (pMeshModelList->Load(sSubFolder + sInFile))
{
oGeoModel.AddPropagationPathVisualization(path, layerName);
cout << "Successfully loaded '" << sInFile << "'" << endl;
}
pathList.clear();
sw.start();
if (oGeoModel.GetTopLevelMesh()->GetInsideMeshJordanMethodAxisAligned(pSensor->vPos))
oISEngine.ConstructReflectionPathsInsideForOrder(pSensor, pathList, ITAGeo::ORDER_1);
else
oISEngine.ConstructReflectionPathsOutsideForOrder(pSensor, pathList, ITAGeo::ORDER_1);
cout << "Calculation time reflection paths 1st order: " << timeToString(sw.stop()) << endl;
layerName = "Refl_Path_ORDER_1_NUMBER_" + to_string(pathList.GetNumPaths());
for (auto path : pathList)
{
oGeoModel.AddPropagationPathVisualization(path, layerName);
cerr << "Could not load " << sInFile << endl;
return 255;
}
pathList.clear();
sw.start();
if (oGeoModel.GetTopLevelMesh()->GetInsideMeshJordanMethodAxisAligned(pSensor->vPos))
oISEngine.ConstructReflectionPathsInsideForOrder(pSensor, pathList, ITAGeo::ORDER_2);
else
oISEngine.ConstructReflectionPathsOutsideForOrder(pSensor, pathList, ITAGeo::ORDER_2);
cout << "Calculation time reflection paths 2nd order: " << timeToString(sw.stop()) << endl;
layerName = "Refl_Path_ORDER_2_NUMBER_" + to_string(pathList.GetNumPaths());
for (auto path : pathList)
{
oGeoModel.AddPropagationPathVisualization(path, layerName);
}
auto pSensor = make_shared< CSensor >( VistaVector3D( 3.0f, 3.3f, 1.3f ) );
auto pEmitter = make_shared< CEmitter >( VistaVector3D( 2.1f, 2.2f, 1.7f ) );
pathList.clear();
sw.start();
if (oGeoModel.GetTopLevelMesh()->GetInsideMeshJordanMethodAxisAligned(pSensor->vPos))
oISEngine.ConstructReflectionPathsInsideForOrder(pSensor, pathList, ITAGeo::ORDER_3);
else
oISEngine.ConstructReflectionPathsOutsideForOrder(pSensor, pathList, ITAGeo::ORDER_3);
cout << "Calculation time reflection paths 3rd order: " << timeToString(sw.stop()) << endl;
cout << "Emitter: " << pEmitter->vPos << endl;
cout << "Sensor: " << pSensor->vPos << endl;
layerName = "Refl_Path_ORDER_3_NUMBER_" + to_string(pathList.GetNumPaths());
for (auto path : pathList)
{
oGeoModel.AddPropagationPathVisualization(path, layerName);
}
#endif
auto pPathEngine = make_shared<CombinatedModel::CPathEngine>(pMeshModelList);
pPathEngine->CreatePropagationTree(pEmitter,ITAGeo::DIFFRACTION_ORDER_2,ITAGeo::SPECULAR_REFLECTION_ORDER_2,ORDER_3);
#if 1
CPropagationPathList pathListAll;
sw.start();
oISEngine.ConstructReflectionPaths(pSensor, pathListAll);
cout << "Calculation time all reflection paths without face culling: " << timeToString(sw.stop()) << endl;
string layerNameNoCulling = "All_Paths_NoFaceCulling_NUMBER_" + to_string(pathListAll.GetNumPaths());
for (auto path : pathListAll)
{
oGeoModel.AddPropagationPathVisualization(path, layerNameNoCulling);
}
CPropagationPathList pathListVisible;
sw.start();
oGeoModel.GetTopLevelMesh()->FilterVisiblePaths(pathListAll, pathListVisible);
cout << "Calculation time filtering visible reflection paths without face culling: " << timeToString(sw.stop()) << endl;
layerNameNoCulling = "Visible_Paths_NoFaceCulling_NUMBER_" + to_string(pathListVisible.GetNumPaths());
for (auto path : pathListVisible)
{
oGeoModel.AddPropagationPathVisualization(path, layerNameNoCulling);
}
pathListAll.clear();
sw.start();
if (oGeoModel.GetTopLevelMesh()->GetInsideMeshJordanMethodAxisAligned(pSensor->vPos))
oISEngine.ConstructReflectionPathsInside(pSensor, pathListAll);
else
oISEngine.ConstructReflectionPathsOutside(pSensor, pathListAll);
cout << "Calculation time all reflection paths with face culling: " << timeToString(sw.stop()) << endl;
CPropagationPathList pathList;
layerNameNoCulling = "All_Paths_FaceCulling_NUMBER_" + to_string(pathListAll.GetNumPaths());
for (auto path : pathListAll)
{
oGeoModel.AddPropagationPathVisualization(path, layerNameNoCulling);
}
sw.start();
oGeoModel.GetTopLevelMesh()->FilterVisiblePaths(pathListAll, pathListVisible);
cout << "Calculation time filtering visible reflection paths with face culling: " << timeToString(sw.stop()) << endl;
layerNameNoCulling = "Visible_Paths_FaceCulling_NUMBER_" + to_string(pathListVisible.GetNumPaths());
for (auto path : pathListVisible)
{
oGeoModel.AddPropagationPathVisualization(path, layerNameNoCulling);
}
#endif
oGeoModel.Store(sSubFolder +"SimpleImageModelTest_"+ sInFile);
......
B໿SketchUp Modelࣿ{17.0.1}ꔃ⚢哯䤲予ꨴ㡟㪬ÿ郦嬞￿ 噃牥楳湯慍ー￾䌉䄀爀挀䌀甀爀瘀攀̀＀￾䌊䄀琀琀爀椀戀甀琀攀＀￾䌓䄀琀琀爀椀戀甀琀攀䌀漀渀琀愀椀渀攀爀＀￾䌏䄀琀琀爀椀戀甀琀攀一愀洀攀搀Ā＀￾䌐䈀愀挀欀最爀漀甀渀搀䤀洀愀最攀਀＀￾䌇䌀愀洀攀爀愀Ԁ＀￾䌊䌀漀洀瀀漀渀攀渀琀଀＀￾䌒䌀漀洀瀀漀渀攀渀琀䈀攀栀愀瘀椀漀爀Ԁ＀￾䌔䌀漀洀瀀漀渀攀渀琀䐀攀昀椀渀椀琀椀漀渀਀＀￾䌒䌀漀洀瀀漀渀攀渀琀䤀渀猀琀愀渀挀攀Ԁ＀￾䌕䌀漀渀猀琀爀甀挀琀椀漀渀䜀攀漀洀攀琀爀礀＀￾䌑䌀漀渀猀琀爀甀挀琀椀漀渀䰀椀渀攀Ā＀￾䌒䌀漀渀猀琀爀甀挀琀椀漀渀倀漀椀渀琀＀￾䌆䌀甀爀瘀攀Ѐ＀￾䌏䐀攀昀椀渀椀琀椀漀渀䰀椀猀琀＀￾䌄䐀椀戀̀＀￾䌊䐀椀洀攀渀猀椀漀渀Ā＀￾䌐䐀椀洀攀渀猀椀漀渀䰀椀渀攀愀爀؀＀￾䌐䐀椀洀攀渀猀椀漀渀刀愀搀椀愀氀Ȁ＀￾䌏䐀椀洀攀渀猀椀漀渀匀琀礀氀攀Ѐ＀￾䌏䐀爀愀眀椀渀最䔀氀攀洀攀渀琀ऀ＀￾䌅䔀搀最攀Ȁ＀￾䌈䔀搀最攀唀猀攀Ā＀￾䌇䔀渀琀椀琀礀Ԁ＀￾䌅䘀愀挀攀̀＀￾䌒䘀愀挀攀吀攀砀琀甀爀攀䌀漀漀爀搀猀Ѐ＀￾䌌䘀漀渀琀䴀愀渀愀最攀爀＀￾䌆䜀爀漀甀瀀Ā＀￾䌆䤀洀愀最攀Ā＀￾䌆䰀愀礀攀爀Ȁ＀￾䌍䰀愀礀攀爀䴀愀渀愀最攀爀Ѐ＀￾䌅䰀漀漀瀀Ā＀￾䌉䴀愀琀攀爀椀愀氀ఀ＀￾䌐䴀愀琀攀爀椀愀氀䴀愀渀愀最攀爀Ѐ＀￾䌉倀愀最攀䰀椀猀琀Ā＀￾䌋倀漀氀礀氀椀渀攀㌀搀＀￾䌍刀攀氀愀琀椀漀渀猀栀椀瀀＀￾䌐刀攀氀愀琀椀漀渀猀栀椀瀀䴀愀瀀＀￾䌑刀攀渀搀攀爀椀渀最伀瀀琀椀漀渀猀␀＀￾䌋匀挀栀攀洀愀䘀椀氀攀Ā＀￾䌑匀挀栀攀洀愀䘀椀氀琀攀爀䘀椀氀攀＀￾䌎匀挀栀攀洀愀娀椀瀀䘀椀氀攀Ā＀￾䌍匀攀挀琀椀漀渀倀氀愀渀攀Ȁ＀￾䌋匀栀愀搀漀眀䤀渀昀漀܀＀￾䌇匀欀䘀漀渀琀Ā＀￾䌉匀欀攀琀挀栀䌀匀＀￾䌎匀欀攀琀挀栀唀瀀䴀漀搀攀氀ᨀ＀￾䌍匀欀攀琀挀栀唀瀀倀愀最攀Ā＀￾䌉匀欀瀀匀琀礀氀攀Ā＀￾䌐匀欀瀀匀琀礀氀攀䴀愀渀愀最攀爀Ȁ＀￾䌅吀攀砀琀ऀ＀￾䌊吀攀砀琀匀琀礀氀攀Ԁ＀￾䌈吀攀砀琀甀爀攀؀＀￾䌊吀栀甀洀戀渀愀椀氀Ā＀￾䌇嘀攀爀琀攀砀＀￾䌉嘀椀攀眀倀愀最攀ఀ＀￾䌊圀愀琀攀爀洀愀爀欀Ā＀￾䌑圀愀琀攀爀洀愀爀欀䴀愀渀愀最攀爀Ȁ＀￾䔒渀搀ⴀ伀昀ⴀ嘀攀爀猀椀漀渀ⴀ䴀愀瀀Ā뀀Ȁ케+＀ϿЀ䌀楄Ѣ휀褀乐േᨊ
B໿SketchUp Model೿{18.0.16975}䙓⽣얢䀷窉䲆⤦퍌ÿ䟡寏￿ 噃牥楳湯慍ー￾䌉䄀爀挀䌀甀爀瘀攀̀＀￾䌊䄀琀琀爀椀戀甀琀攀＀￾䌓䄀琀琀爀椀戀甀琀攀䌀漀渀琀愀椀渀攀爀＀￾䌏䄀琀琀爀椀戀甀琀攀一愀洀攀搀Ā＀￾䌐䈀愀挀欀最爀漀甀渀搀䤀洀愀最攀਀＀￾䌇䌀愀洀攀爀愀Ԁ＀￾䌊䌀漀洀瀀漀渀攀渀琀଀＀￾䌒䌀漀洀瀀漀渀攀渀琀䈀攀栀愀瘀椀漀爀Ԁ＀￾䌔䌀漀洀瀀漀渀攀渀琀䐀攀昀椀渀椀琀椀漀渀଀＀￾䌒䌀漀洀瀀漀渀攀渀琀䤀渀猀琀愀渀挀攀؀＀￾䌕䌀漀渀猀琀爀甀挀琀椀漀渀䜀攀漀洀攀琀爀礀＀￾䌑䌀漀渀猀琀爀甀挀琀椀漀渀䰀椀渀攀Ā＀￾䌒䌀漀渀猀琀爀甀挀琀椀漀渀倀漀椀渀琀＀￾䌆䌀甀爀瘀攀Ѐ＀￾䌏䐀攀昀椀渀椀琀椀漀渀䰀椀猀琀＀￾䌄䐀椀戀̀＀￾䌊䐀椀洀攀渀猀椀漀渀Ā＀￾䌐䐀椀洀攀渀猀椀漀渀䰀椀渀攀愀爀؀＀￾䌐䐀椀洀攀渀猀椀漀渀刀愀搀椀愀氀Ȁ＀￾䌏䐀椀洀攀渀猀椀漀渀匀琀礀氀攀Ѐ＀￾䌏䐀爀愀眀椀渀最䔀氀攀洀攀渀琀ऀ＀￾䌅䔀搀最攀Ȁ＀￾䌈䔀搀最攀唀猀攀Ā＀￾䌇䔀渀琀椀琀礀Ԁ＀￾䌅䘀愀挀攀̀＀￾䌒䘀愀挀攀吀攀砀琀甀爀攀䌀漀漀爀搀猀Ѐ＀￾䌌䘀漀渀琀䴀愀渀愀最攀爀＀￾䌆䜀爀漀甀瀀Ā＀￾䌆䤀洀愀最攀Ā＀￾䌆䰀愀礀攀爀Ȁ＀￾䌍䰀愀礀攀爀䴀愀渀愀最攀爀Ѐ＀￾䌅䰀漀漀瀀Ā＀￾䌉䴀愀琀攀爀椀愀氀ఀ＀￾䌐䴀愀琀攀爀椀愀氀䴀愀渀愀最攀爀Ѐ＀￾䌉倀愀最攀䰀椀猀琀Ā＀￾䌋倀漀氀礀氀椀渀攀㌀搀＀￾䌍刀攀氀愀琀椀漀渀猀栀椀瀀＀￾䌐刀攀氀愀琀椀漀渀猀栀椀瀀䴀愀瀀＀￾䌑刀攀渀搀攀爀椀渀最伀瀀琀椀漀渀猀─＀￾䌋匀挀栀攀洀愀䘀椀氀攀Ā＀￾䌑匀挀栀攀洀愀䘀椀氀琀攀爀䘀椀氀攀＀￾䌎匀挀栀攀洀愀娀椀瀀䘀椀氀攀Ā＀￾䌍匀攀挀琀椀漀渀倀氀愀渀攀̀＀￾䌋匀栀愀搀漀眀䤀渀昀漀܀＀￾䌇匀欀䘀漀渀琀Ā＀￾䌉匀欀攀琀挀栀䌀匀＀￾䌎匀欀攀琀挀栀唀瀀䴀漀搀攀氀ᰀ＀￾䌍匀欀攀琀挀栀唀瀀倀愀最攀Ā＀￾䌉匀欀瀀匀琀礀氀攀Ā＀￾䌐匀欀瀀匀琀礀氀攀䴀愀渀愀最攀爀Ȁ＀￾䌅吀攀砀琀ऀ＀￾䌊吀攀砀琀匀琀礀氀攀Ԁ＀￾䌈吀攀砀琀甀爀攀؀＀￾䌊吀栀甀洀戀渀愀椀氀Ā＀￾䌇嘀攀爀琀攀砀＀￾䌉嘀椀攀眀倀愀最攀ఀ＀￾䌊圀愀琀攀爀洀愀爀欀Ā＀￾䌑圀愀琀攀爀洀愀爀欀䴀愀渀愀最攀爀Ȁ＀￾䔒渀搀ⴀ伀昀ⴀ嘀攀爀猀椀漀渀ⴀ䴀愀瀀Ā뀀Ȁ伀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