Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
ITAPropagationPathSim
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Institute of Technical Acoustics (ITA)
ITAPropagationPathSim
Commits
29587918
Commit
29587918
authored
Jan 09, 2019
by
Armin Erraji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added test for ImageSource test of MeshModelList (wip).
parent
f40d4e55
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
141 additions
and
0 deletions
+141
-0
tests/MeshModelList/CMakeLists.txt
tests/MeshModelList/CMakeLists.txt
+1
-0
tests/MeshModelList/Reflection/CMakeLists.txt
tests/MeshModelList/Reflection/CMakeLists.txt
+25
-0
tests/MeshModelList/Reflection/SimpleBuildings.skp
tests/MeshModelList/Reflection/SimpleBuildings.skp
+0
-0
tests/MeshModelList/Reflection/SimpleMeshModelImageSourceTest.cpp
...shModelList/Reflection/SimpleMeshModelImageSourceTest.cpp
+115
-0
No files found.
tests/MeshModelList/CMakeLists.txt
View file @
29587918
cmake_minimum_required
(
VERSION 2.8
)
add_subdirectory
(
"Diffraction"
)
add_subdirectory
(
"Reflection"
)
\ No newline at end of file
tests/MeshModelList/Reflection/CMakeLists.txt
0 → 100644
View file @
29587918
cmake_minimum_required
(
VERSION 2.8
)
project
(
ITAPropagationPathSimTest
)
list
(
APPEND CMAKE_MODULE_PATH
"$ENV{VISTA_CMAKE_COMMON}"
)
include
(
VistaCommon
)
vista_use_package
(
ITABase REQUIRED FIND_DEPENDENCIES
)
vista_use_package
(
ITAPropagationPathSim REQUIRED FIND_DEPENDENCIES
)
if
(
ITA_CORE_LIBS_BUILD_STATIC
)
add_definitions
(
-DITA_BASE_STATIC
)
endif
(
)
if
(
ITA_GEOMETRICAL_ACOUSTICS_BUILD_STATIC
)
add_definitions
(
-DITA_PROPAGATION_PATH_SIM_STATIC -DITA_GEO_STATIC
)
endif
(
)
add_executable
(
SimpleMeshModelImageSourceTest SimpleMeshModelImageSourceTest.cpp
)
target_link_libraries
(
SimpleMeshModelImageSourceTest
${
VISTA_USE_PACKAGE_LIBRARIES
}
)
vista_configure_app
(
SimpleMeshModelImageSourceTest
)
vista_install
(
SimpleMeshModelImageSourceTest
)
vista_create_default_info_file
(
SimpleMeshModelImageSourceTest
)
set_property
(
TARGET SimpleMeshModelImageSourceTest PROPERTY FOLDER
"ITAGeometricalAcoustics/Tests/ITAPropagationPathSim/MeshModelDiffraction"
)
tests/MeshModelList/Reflection/SimpleBuildings.skp
0 → 100644
View file @
29587918
B
SketchUp Model{18.0.16975}맑蜖軩䇎犚텸洞ÿॹ寴噃牥楳湯慍ー䌉䄀爀挀䌀甀爀瘀攀̀䌊䄀琀琀爀椀戀甀琀攀䌓䄀琀琀爀椀戀甀琀攀䌀漀渀琀愀椀渀攀爀䌏䄀琀琀爀椀戀甀琀攀一愀洀攀搀Ā䌐䈀愀挀欀最爀漀甀渀搀䤀洀愀最攀䌇䌀愀洀攀爀愀Ԁ䌊䌀漀洀瀀漀渀攀渀琀䌒䌀漀洀瀀漀渀攀渀琀䈀攀栀愀瘀椀漀爀Ԁ䌔䌀漀洀瀀漀渀攀渀琀䐀攀昀椀渀椀琀椀漀渀䌒䌀漀洀瀀漀渀攀渀琀䤀渀猀琀愀渀挀攀䌕䌀漀渀猀琀爀甀挀琀椀漀渀䜀攀漀洀攀琀爀礀䌑䌀漀渀猀琀爀甀挀琀椀漀渀䰀椀渀攀Ā䌒䌀漀渀猀琀爀甀挀琀椀漀渀倀漀椀渀琀䌆䌀甀爀瘀攀Ѐ䌏䐀攀昀椀渀椀琀椀漀渀䰀椀猀琀䌄䐀椀戀̀䌊䐀椀洀攀渀猀椀漀渀Ā䌐䐀椀洀攀渀猀椀漀渀䰀椀渀攀愀爀䌐䐀椀洀攀渀猀椀漀渀刀愀搀椀愀氀Ȁ䌏䐀椀洀攀渀猀椀漀渀匀琀礀氀攀Ѐ䌏䐀爀愀眀椀渀最䔀氀攀洀攀渀琀ऀ䌅䔀搀最攀Ȁ䌈䔀搀最攀唀猀攀Ā䌇䔀渀琀椀琀礀Ԁ䌅䘀愀挀攀̀䌒䘀愀挀攀吀攀砀琀甀爀攀䌀漀漀爀搀猀Ѐ䌌䘀漀渀琀䴀愀渀愀最攀爀䌆䜀爀漀甀瀀Ā䌆䤀洀愀最攀Ā䌆䰀愀礀攀爀Ȁ䌍䰀愀礀攀爀䴀愀渀愀最攀爀Ѐ䌅䰀漀漀瀀Ā䌉䴀愀琀攀爀椀愀氀ఀ䌐䴀愀琀攀爀椀愀氀䴀愀渀愀最攀爀Ѐ䌉倀愀最攀䰀椀猀琀Ā䌋倀漀氀礀氀椀渀攀㌀搀䌍刀攀氀愀琀椀漀渀猀栀椀瀀䌐刀攀氀愀琀椀漀渀猀栀椀瀀䴀愀瀀䌑刀攀渀搀攀爀椀渀最伀瀀琀椀漀渀猀─䌋匀挀栀攀洀愀䘀椀氀攀Ā䌑匀挀栀攀洀愀䘀椀氀琀攀爀䘀椀氀攀䌎匀挀栀攀洀愀娀椀瀀䘀椀氀攀Ā䌍匀攀挀琀椀漀渀倀氀愀渀攀̀䌋匀栀愀搀漀眀䤀渀昀漀܀䌇匀欀䘀漀渀琀Ā䌉匀欀攀琀挀栀䌀匀䌎匀欀攀琀挀栀唀瀀䴀漀搀攀氀ᰀ䌍匀欀攀琀挀栀唀瀀倀愀最攀Ā䌉匀欀瀀匀琀礀氀攀Ā䌐匀欀瀀匀琀礀氀攀䴀愀渀愀最攀爀Ȁ䌅吀攀砀琀ऀ䌊吀攀砀琀匀琀礀氀攀Ԁ䌈吀攀砀琀甀爀攀䌊吀栀甀洀戀渀愀椀氀Ā䌇嘀攀爀琀攀砀䌉嘀椀攀眀倀愀最攀ఀ䌊圀愀琀攀爀洀愀爀欀Ā䌑圀愀琀攀爀洀愀爀欀䴀愀渀愀最攀爀Ȁ䔒渀搀ⴀ伀昀ⴀ嘀攀爀猀椀漀渀ⴀ䴀愀瀀Ā뀀ȀϿЀ䌀楄Ѣ鄀褀乐േᨊ
tests/MeshModelList/Reflection/SimpleMeshModelImageSourceTest.cpp
0 → 100644
View file @
29587918
/*
* ----------------------------------------------------------------
*
* ITA geometrical acoustics
* (c) Copyright Institute of Technical Acoustics (ITA)
* RWTH Aachen University, Germany, 2015-2018
*
* ----------------------------------------------------------------
* ____ __________ _______
* // / //__ ___/ // _ |
* // / // / // /_| |
* // / // / // ___ |
* //__/ //__/ //__/ |__|
*
* ----------------------------------------------------------------
*
* Tests the image (source) model algorithm.
*
*/
#include <ITAStopWatch.h>
#include <ITAStringUtils.h>
#include <ITAPropagationModels/include/ITAPropagationModels/FilterEngine.h>
#include <ITABaseDefinitions.h>
#include <ITAPropagationPathSim/UrbanEngine/UrbanImageSource.h>
#include <ITAGeo/Base.h>
#include <ITAGeo/Utils.h>
#include <ITAGeo/Urban/Model.h>
#include <ITAGeo/SketchUp/Model.h>
#include <ITAGeo/Material/Material.h>
#include <ITAGeo/Material/Manager.h>
#include <cassert>
using
namespace
std
;
using
namespace
ITAGeo
;
using
namespace
ITAPropagationPathSim
;
int
main
(
int
iNumInArgs
,
char
*
pcInArgs
[]
)
{
string
sSUFolder
=
"SketchUpFiles/"
;
string
sJsonFolder
=
"JsonFiles/"
;
string
sInFile
=
"SimpleUrbanEnvironment"
;
if
(
iNumInArgs
>
1
)
sInFile
=
string
(
pcInArgs
[
1
]
);
CMaterialDirectory
oMaterialDir
(
"./"
);
SketchUp
::
CModel
oGeoModel
;
ITAGeo
::
Urban
::
CModel
oUrbanModel
;
oUrbanModel
.
SetMaterialManager
(
&
oMaterialDir
);
if
(
oUrbanModel
.
Load
(
sSUFolder
+
sInFile
+
".skp"
))
{
cout
<<
"Succesffully loaded '"
<<
sInFile
<<
"'"
<<
endl
;
}
else
{
cerr
<<
"Could not load "
<<
sInFile
<<
endl
;
return
255
;
}
//SketchUp geo model for adding later calculated paths to sketchUp file
oGeoModel
.
Load
(
sSUFolder
+
sInFile
+
".skp"
);
//Set emitter and sensor
auto
pEmitter
=
make_shared
<
CEmitter
>
(
VistaVector3D
(
5.1
f
,
2.2
f
,
1.7
f
));
//auto pSensor = make_shared<CSensor>( VistaVector3D( 3.0f, 3.3f, 1.3f ) );
auto
pSensor
=
make_shared
<
CSensor
>
(
VistaVector3D
(
-
3.0
f
,
-
3.3
f
,
2.3
f
));
cout
<<
"Emitter: "
<<
pEmitter
->
vPos
<<
endl
;
cout
<<
"Sensor: "
<<
pSensor
->
vPos
<<
endl
;
//Set the mirror image engine for the urban environment
ITAPropagationPathSim
::
UrbanEngine
::
MirrorImage
::
CSource
oUrbanEngine
(
oUrbanModel
,
Order
::
ORDER_3
);
oUrbanEngine
.
ConstructImages
(
pEmitter
);
//Set the reflection sound paths
CPropagationPathList
oPathListAll
,
oPathListVisible
;
oUrbanEngine
.
ConstructReflectionPathsOutside
(
pSensor
,
oPathListAll
);
//Get the visible sound paths
oUrbanModel
.
FilterVisiblePaths
(
oPathListAll
,
oPathListVisible
);
//Add paths to SketchUp Visualisation
string
layerName
=
"All_Refl_Paths_Number_Reflection_"
+
to_string
(
oPathListAll
.
GetNumPaths
());
for
(
const
auto
&
oPath
:
oPathListAll
)
{
oGeoModel
.
AddPropagationPathVisualization
(
oPath
,
layerName
);
}
layerName
=
"Visible_Refl_Paths_Number_Reflection_"
+
to_string
(
oPathListVisible
.
GetNumPaths
());
for
(
const
auto
&
oPath
:
oPathListVisible
)
{
oGeoModel
.
AddPropagationPathVisualization
(
oPath
,
layerName
);
}
//Add emitter and sensor to visualization
oGeoModel
.
AddEmitterVisualization
(
*
pEmitter
,
"Emitter A"
);
oGeoModel
.
AddSensorVisualization
(
*
pSensor
,
"Sensor A"
);
//Store model
oGeoModel
.
Store
(
sSUFolder
+
"SimpleUrbanImageModelTest_"
+
sInFile
+
".skp"
);
oPathListVisible
.
Store
(
sJsonFolder
+
"SimpleUrbanImageModelTest_"
+
sInFile
+
".json"
);
return
0
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment