Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
ITAGeo
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)
ITAGeo
Commits
12c91c27
Commit
12c91c27
authored
Jan 21, 2019
by
Armin Erraji
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'remotes/origin/develop' into ma_2018/erraji
# Conflicts: # include/ITAGeo/Halfedge/MeshModel.h
parents
2d3d8730
4ba76017
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
35 deletions
+38
-35
include/ITAGeo/Halfedge/MeshModel.h
include/ITAGeo/Halfedge/MeshModel.h
+38
-35
No files found.
include/ITAGeo/Halfedge/MeshModel.h
View file @
12c91c27
...
...
@@ -23,9 +23,12 @@
#include <ITAGeo/Base.h>
#include <ITAGeo/Definitions.h>
#include <ITAGeo/ModelBase.h>
#include <ITAGeo/Material/Manager.h>
// STL includes
#include <string>
#include <map>
#include <vector>
// Forwards
struct
ITA_GEO_API
CITAMeshPtr
;
...
...
@@ -215,7 +218,7 @@ namespace ITAGeo
};
class
ITA_GEO_API
CMeshModelList
:
public
vector
<
shared_ptr
<
CMeshModel
>
>
class
ITA_GEO_API
CMeshModelList
:
public
std
::
vector
<
std
::
shared_ptr
<
CMeshModel
>
>
{
public:
// Public member functions
...
...
@@ -227,7 +230,7 @@ namespace ITAGeo
};
//! Get the mesh model
inline
Halfedge
::
CMeshModelShared
GetMeshModel
(
string
sName
)
const
inline
Halfedge
::
CMeshModelShared
GetMeshModel
(
st
d
::
st
ring
sName
)
const
{
return
GetMeshModel
(
m_mapMeshNameToIndex
.
at
(
sName
));
};
...
...
@@ -236,40 +239,40 @@ namespace ITAGeo
void
CopyFrom
(
const
CMeshModelList
&
vpMeshModelList
);
//! Get the number of meshes
inline
int
GetNumMeshes
()
const
{
return
(
int
)
this
->
size
();
inline
int
GetNumMeshes
()
const
{
return
(
int
)
this
->
size
();
};
//! Loads mesh list data from given file path
/*
* Loads SketchUp file with meshes as groups
*
* @param[in] sMeshModelFilePath File path to mesh model, e.g. skp or gml file
* @param[in] bLoadTopLevelMesh Load the top level mesh
*
* @note Throws ITAException (i.e. if file not found)
* @return True, if model file can be translated into a scene
*
*/
//! Loads mesh list data from given file path
/*
* Loads SketchUp file with meshes as groups
*
* @param[in] sMeshModelFilePath File path to mesh model, e.g. skp or gml file
* @param[in] bLoadTopLevelMesh Load the top level mesh
*
* @note Throws ITAException (i.e. if file not found)
* @return True, if model file can be translated into a scene
*
*/
bool
Load
(
const
std
::
string
&
sMeshModelFilePath
,
bool
bLoadTopLevelMesh
=
true
);
//! Saves mesh model data to given file path
/*
* @param[in] sMeshModelFilePath File path where to store urban model
* @param[in] bOverwrite Permit overwriting of eventually existing file
*
* @note Throws ITAException (i.e. if file could not be written)
* @return True, if file could be exported
*/
//! Saves mesh model data to given file path
/*
* @param[in] sMeshModelFilePath File path where to store urban model
* @param[in] bOverwrite Permit overwriting of eventually existing file
*
* @note Throws ITAException (i.e. if file could not be written)
* @return True, if file could be exported
*/
bool
Store
(
const
std
::
string
&
sMeshModelFilePath
,
bool
bOverwrite
=
true
)
const
;
//! Filters the visible paths
/*
* @param[in] oPathListIn input path list that contains paths to be filtered
* @param[out] oPathListOut output path list that contains the filtered paths
*/
void
FilterVisiblePaths
(
CPropagationPathList
&
oPathListIn
,
CPropagationPathList
&
oPathListOut
)
const
;
//! Filters the visible paths
/*
* @param[in] oPathListIn input path list that contains paths to be filtered
* @param[out] oPathListOut output path list that contains the filtered paths
*/
void
FilterVisiblePaths
(
CPropagationPathList
&
oPathListIn
,
CPropagationPathList
&
oPathListOut
)
const
;
//! Sets the material manager for this model
/**
...
...
@@ -278,7 +281,7 @@ namespace ITAGeo
*
* @param[in] pMaterialManager Associated material manager (with write access)
*/
inline
void
SetMaterialManager
(
ITAGeo
::
CMaterialManager
*
pMaterialManager
)
inline
void
SetMaterialManager
(
std
::
shared_ptr
<
ITAGeo
::
Material
::
IManager
>
pMaterialManager
)
{
//Set material of each element
for
(
auto
&
pMeshModel
:
*
this
)
...
...
@@ -293,11 +296,11 @@ namespace ITAGeo
private:
// Private member variables
size_t
m_numFaces
=
0
;
//!< Number of faces of all meshes
ITAGeo
::
CMaterialManager
*
m_pMaterialManager
;
//!< Associated material manager (where to add materials during load)
map
<
string
,
int
>
m_mapMeshNameToIndex
;
//!< Map to associate mesh names with indices of meshes (to get the corresponding map by its name)
std
::
shared_ptr
<
ITAGeo
::
Material
::
IManager
>
m_pMaterialManager
;
//!< Associated material manager (where to add materials during load)
std
::
map
<
std
::
string
,
int
>
m_mapMeshNameToIndex
;
//!< Map to associate mesh names with indices of meshes (to get the corresponding map by its name)
// Private member functions
bool
IsPathVisible
(
const
CPropagationPath
&
oPath
)
const
;
// Private member functions
bool
IsPathVisible
(
const
CPropagationPath
&
oPath
)
const
;
};
}
...
...
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