Skip to content
Snippets Groups Projects
Commit c31607a5 authored by jcarpent's avatar jcarpent
Browse files

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

parent ceb65b19
No related branches found
No related tags found
No related merge requests found
......@@ -65,7 +65,7 @@ IF (UNIX)
# Create target libpinocchio.so
ADD_LIBRARY ( ${PROJECT_NAME} SHARED ${HEADERS} ${${PROJECT_NAME}_SOURCES} )
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)
PKG_CONFIG_USE_DEPENDENCY(${PROJECT_NAME} urdfdom)
......
......@@ -61,9 +61,12 @@ struct TriangleAndVertices
* @param[in] mesh The mesh that must be built
* @param tv Triangles and Vertices of the mesh submodels
*/
inline void buildMesh (const ::urdf::Vector3& scale, const aiScene* scene, const aiNode* node,
std::vector<unsigned>& subMeshIndexes, const PolyhedronPtrType& mesh,
TriangleAndVertices& tv)
inline void buildMesh (const ::urdf::Vector3 & scale,
const aiScene* scene,
const aiNode* node,
std::vector<unsigned> & subMeshIndexes,
const PolyhedronPtrType & mesh,
TriangleAndVertices & tv)
{
if (!node) return;
......@@ -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] mesh The mesh that must be built
*/
inline void meshFromAssimpScene (const std::string& name, const ::urdf::Vector3& scale,
const aiScene* scene,const PolyhedronPtrType& mesh)
inline void meshFromAssimpScene (const std::string & name,
const ::urdf::Vector3 & scale,
const aiScene* scene,
const PolyhedronPtrType & mesh)
{
TriangleAndVertices tv;
......@@ -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] polyhedron The resulted polyhedron
*/
inline void loadPolyhedronFromResource ( const std::string& resource_path, const ::urdf::Vector3& scale,
const PolyhedronPtrType& polyhedron)
inline void loadPolyhedronFromResource (const std::string & resource_path,
const ::urdf::Vector3 & scale,
const PolyhedronPtrType & polyhedron)
{
Assimp::Importer importer;
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
/**
* @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
*
* @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 +
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment