Commit c31607a5 authored by jcarpent's avatar jcarpent
Browse files

[C++] Correct some constness of input arguments + indentation

parent ceb65b19
...@@ -65,7 +65,7 @@ IF (UNIX) ...@@ -65,7 +65,7 @@ IF (UNIX)
# Create target libpinocchio.so # Create target libpinocchio.so
ADD_LIBRARY ( ${PROJECT_NAME} SHARED ${HEADERS} ${${PROJECT_NAME}_SOURCES} ) ADD_LIBRARY ( ${PROJECT_NAME} SHARED ${HEADERS} ${${PROJECT_NAME}_SOURCES} )
SET_TARGET_PROPERTIES( ${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX) SET_TARGET_PROPERTIES( ${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX)
PKG_CONFIG_USE_DEPENDENCY(${PROJECT_NAME} eigen3) PKG_CONFIG_USE_DEPENDENCY(${PROJECT_NAME} eigen3)
IF(URDFDOM_FOUND) IF(URDFDOM_FOUND)
PKG_CONFIG_USE_DEPENDENCY(${PROJECT_NAME} urdfdom) PKG_CONFIG_USE_DEPENDENCY(${PROJECT_NAME} urdfdom)
......
...@@ -61,9 +61,12 @@ struct TriangleAndVertices ...@@ -61,9 +61,12 @@ struct TriangleAndVertices
* @param[in] mesh The mesh that must be built * @param[in] mesh The mesh that must be built
* @param tv Triangles and Vertices of the mesh submodels * @param tv Triangles and Vertices of the mesh submodels
*/ */
inline void buildMesh (const ::urdf::Vector3& scale, const aiScene* scene, const aiNode* node, inline void buildMesh (const ::urdf::Vector3 & scale,
std::vector<unsigned>& subMeshIndexes, const PolyhedronPtrType& mesh, const aiScene* scene,
TriangleAndVertices& tv) const aiNode* node,
std::vector<unsigned> & subMeshIndexes,
const PolyhedronPtrType & mesh,
TriangleAndVertices & tv)
{ {
if (!node) return; if (!node) return;
...@@ -132,8 +135,10 @@ inline void buildMesh (const ::urdf::Vector3& scale, const aiScene* scene, const ...@@ -132,8 +135,10 @@ inline void buildMesh (const ::urdf::Vector3& scale, const aiScene* scene, const
* @param[in] scene Pointer to the assimp scene * @param[in] scene Pointer to the assimp scene
* @param[in] mesh The mesh that must be built * @param[in] mesh The mesh that must be built
*/ */
inline void meshFromAssimpScene (const std::string& name, const ::urdf::Vector3& scale, inline void meshFromAssimpScene (const std::string & name,
const aiScene* scene,const PolyhedronPtrType& mesh) const ::urdf::Vector3 & scale,
const aiScene* scene,
const PolyhedronPtrType & mesh)
{ {
TriangleAndVertices tv; TriangleAndVertices tv;
...@@ -169,8 +174,9 @@ inline void meshFromAssimpScene (const std::string& name, const ::urdf::Vector3& ...@@ -169,8 +174,9 @@ inline void meshFromAssimpScene (const std::string& name, const ::urdf::Vector3&
* @param[in] scale Scale to apply when reading the ressource * @param[in] scale Scale to apply when reading the ressource
* @param[in] polyhedron The resulted polyhedron * @param[in] polyhedron The resulted polyhedron
*/ */
inline void loadPolyhedronFromResource ( const std::string& resource_path, const ::urdf::Vector3& scale, inline void loadPolyhedronFromResource (const std::string & resource_path,
const PolyhedronPtrType& polyhedron) const ::urdf::Vector3 & scale,
const PolyhedronPtrType & polyhedron)
{ {
Assimp::Importer importer; Assimp::Importer importer;
const aiScene* scene = importer.ReadFile(resource_path.c_str(), aiProcess_SortByPType| aiProcess_GenNormals| const aiScene* scene = importer.ReadFile(resource_path.c_str(), aiProcess_SortByPType| aiProcess_GenNormals|
...@@ -189,12 +195,12 @@ inline void loadPolyhedronFromResource ( const std::string& resource_path, const ...@@ -189,12 +195,12 @@ inline void loadPolyhedronFromResource ( const std::string& resource_path, const
/** /**
* @brief Transform a cURL readable path (package://..) to an absolute path for urdf collision path * @brief Transform a cURL readable path (package://..) to an absolute path for urdf collision path
* *
* @param urdf_mesh_path The path given in the urdf file (package://..) * @param[in] urdf_mesh_path The path given in the urdf file (package://..)
* @param[in] meshRootDir Root path to the directory where meshes are located * @param[in] meshRootDir Root path to the directory where meshes are located
* *
* @return The absolute path to the mesh file * @return The absolute path to the mesh file
*/ */
inline std::string fromURDFMeshPathToAbsolutePath(std::string & urdf_mesh_path, std::string meshRootDir) inline std::string fromURDFMeshPathToAbsolutePath(const std::string & urdf_mesh_path, const std::string & meshRootDir)
{ {
std::string absolutePath = std::string(meshRootDir + std::string absolutePath = std::string(meshRootDir +
......
Supports Markdown
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