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

[C++] Rename + aligne code

parent a263cbdd
Branches
Tags
No related merge requests found
......@@ -32,14 +32,13 @@
#include <assimp/Importer.hpp>
#include <assimp/postprocess.h>
#include <hpp/fcl/BV/OBBRSS.h>
#include <hpp/fcl/BVH/BVH_model.h>
#include <exception>
typedef fcl::BVHModel< fcl::OBBRSS > PolyhedronType;
typedef boost::shared_ptr <PolyhedronType> PolyhedronPtrType;
typedef boost::shared_ptr <PolyhedronType> Polyhedron_ptr;
struct TriangleAndVertices
{
......@@ -67,7 +66,7 @@ inline void buildMesh (const ::urdf::Vector3 & scale,
const aiScene* scene,
const aiNode* node,
std::vector<unsigned> & subMeshIndexes,
const PolyhedronPtrType & mesh,
const Polyhedron_ptr & mesh,
TriangleAndVertices & tv)
{
if (!node) return;
......@@ -89,8 +88,8 @@ inline void buildMesh (const ::urdf::Vector3 & scale,
{
aiMesh* input_mesh = scene->mMeshes[node->mMeshes[i]];
unsigned oldNbPoints = mesh->num_vertices;
unsigned oldNbTriangles = mesh->num_tris;
unsigned oldNbPoints = (unsigned) mesh->num_vertices;
unsigned oldNbTriangles = (unsigned) mesh->num_tris;
// Add the vertices
for (uint32_t j = 0; j < input_mesh->mNumVertices; j++)
......@@ -204,7 +203,8 @@ inline void loadPolyhedronFromResource (const std::string & resource_path,
*
* @return The absolute path to the mesh file
*/
inline std::string fromURDFMeshPathToAbsolutePath(const std::string & urdf_mesh_path, const std::string & meshRootDir)
inline std::string fromURDFMeshPathToAbsolutePath(const std::string & urdf_mesh_path,
const std::string & meshRootDir)
{
std::string absolutePath = std::string(meshRootDir +
......
//
// Copyright (c) 2015 CNRS
// Copyright (c) 2015-2016 CNRS
//
// This file is part of Pinocchio
// Pinocchio is free software: you can redistribute it
......@@ -32,13 +32,11 @@
#include <exception>
namespace se3
{
namespace urdf
{
inline fcl::CollisionObject retrieveCollisionGeometry (const ::urdf::LinkConstPtr & link, const std::string & meshRootDir)
{
boost::shared_ptr < ::urdf::Collision> collision = link->collision;
......@@ -55,7 +53,7 @@ namespace se3
::urdf::Vector3 scale = collisionGeometry->scale;
// Create FCL mesh by parsing Collada file.
PolyhedronPtrType polyhedron (new PolyhedronType);
Polyhedron_ptr polyhedron (new PolyhedronType);
loadPolyhedronFromResource (full_path, scale, polyhedron);
geometry = polyhedron;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment