Commit 12c91c27 authored by Armin Erraji's avatar Armin Erraji

Merge remote-tracking branch 'remotes/origin/develop' into ma_2018/erraji

# Conflicts:
#	include/ITAGeo/Halfedge/MeshModel.h
parents 2d3d8730 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;
......@@ -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(std::string 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;
};
}
......
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