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
4ba76017
Commit
4ba76017
authored
Jan 21, 2019
by
Dipl.-Ing. Jonas Stienen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolved conflict in header file of mesh model
parent
a42b7195
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
89 additions
and
0 deletions
+89
-0
include/ITAGeo/Halfedge/MeshModel.h
include/ITAGeo/Halfedge/MeshModel.h
+89
-0
No files found.
include/ITAGeo/Halfedge/MeshModel.h
View file @
4ba76017
...
...
@@ -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
;
...
...
@@ -210,7 +213,93 @@ namespace ITAGeo
protected:
CITAMeshPtr
*
m_prModelMeshData
;
// CITAMesh pointer
};
class
ITA_GEO_API
CMeshModelList
:
public
std
::
vector
<
std
::
shared_ptr
<
CMeshModel
>
>
{
public:
// Public member functions
//! Get the mesh model
inline
Halfedge
::
CMeshModelShared
GetMeshModel
(
int
index
)
const
{
return
this
->
at
(
index
);
};
//! Get the mesh model
inline
Halfedge
::
CMeshModelShared
GetMeshModel
(
std
::
string
sName
)
const
{
return
GetMeshModel
(
m_mapMeshNameToIndex
.
at
(
sName
));
};
//! Load mesh list data from another mesh list
void
CopyFrom
(
const
CMeshModelList
&
vpMeshModelList
);
//! Get the number of meshes
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
*
*/
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
*/
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
;
//! Sets the material manager for this model
/**
* On Loading a model, the associated material manager will be populated with the materials from
* the input file.
*
* @param[in] pMaterialManager Associated material manager (with write access)
*/
inline
void
SetMaterialManager
(
std
::
shared_ptr
<
ITAGeo
::
Material
::
IManager
>
pMaterialManager
)
{
//Set material of each element
for
(
auto
&
pMeshModel
:
*
this
)
{
pMeshModel
->
SetMaterialManager
(
pMaterialManager
);
}
//Also set material manager of list
m_pMaterialManager
=
pMaterialManager
;
};
private:
// Private member variables
size_t
m_numFaces
=
0
;
//!< Number of faces of all meshes
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
;
};
}
}
...
...
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