Commit b7efde08 authored by Florent Lamiraux's avatar Florent Lamiraux Committed by Florent Lamiraux florent@laas.fr
Browse files

Remove many compilation warnings.

parent 405d746c
......@@ -147,7 +147,7 @@ private:
SplitMethodType split_method;
/// @brief Split algorithm 1: Split the node from center
void computeRule_bvcenter(const BV& bv, unsigned int* primitive_indices, int num_primitives)
void computeRule_bvcenter(const BV& bv, unsigned int*, int)
{
Vec3f center = bv.center();
int axis = 2;
......
......@@ -250,7 +250,7 @@ int BVHModel<BV>::addSubModel(const std::vector<Vec3f>& ps)
return BVH_ERR_BUILD_OUT_OF_SEQUENCE;
}
int num_vertices_to_add = ps.size();
int num_vertices_to_add = (int)ps.size();
if(num_vertices + num_vertices_to_add - 1 >= num_vertices_allocated)
{
......@@ -285,7 +285,7 @@ int BVHModel<BV>::addSubModel(const std::vector<Vec3f>& ps, const std::vector<Tr
return BVH_ERR_BUILD_OUT_OF_SEQUENCE;
}
int num_vertices_to_add = ps.size();
int num_vertices_to_add = (int)ps.size();
if(num_vertices + num_vertices_to_add - 1 >= num_vertices_allocated)
{
......@@ -311,7 +311,7 @@ int BVHModel<BV>::addSubModel(const std::vector<Vec3f>& ps, const std::vector<Tr
}
int num_tris_to_add = ts.size();
int num_tris_to_add = (int)ts.size();
if(num_tris + num_tris_to_add - 1 >= num_tris_allocated)
{
......@@ -623,11 +623,12 @@ int BVHModel<BV>::endUpdateModel(bool refit, bool bottomup)
template<typename BV>
int BVHModel<BV>::memUsage(int msg) const
{
int mem_bv_list = sizeof(BV) * num_bvs;
int mem_tri_list = sizeof(Triangle) * num_tris;
int mem_vertex_list = sizeof(Vec3f) * num_vertices;
int mem_bv_list = (int)sizeof(BV) * num_bvs;
int mem_tri_list = (int)sizeof(Triangle) * num_tris;
int mem_vertex_list = (int)sizeof(Vec3f) * num_vertices;
int total_mem = mem_bv_list + mem_tri_list + mem_vertex_list + sizeof(BVHModel<BV>);
int total_mem = mem_bv_list + mem_tri_list + mem_vertex_list +
(int)sizeof(BVHModel<BV>);
if(msg)
{
std::cerr << "Total for model " << total_mem << " bytes." << std::endl;
......
......@@ -95,7 +95,7 @@ void computeSplitValue_bvcenter(const BV& bv, FCL_REAL& split_value)
}
template<typename BV>
void computeSplitValue_mean(const BV& bv, Vec3f* vertices, Triangle* triangles, unsigned int* primitive_indices, int num_primitives, BVHModelType type, const Vec3f& split_vector, FCL_REAL& split_value)
void computeSplitValue_mean(const BV&, Vec3f* vertices, Triangle* triangles, unsigned int* primitive_indices, int num_primitives, BVHModelType type, const Vec3f& split_vector, FCL_REAL& split_value)
{
FCL_REAL sum = 0.0;
if(type == BVH_MODEL_TRIANGLES)
......@@ -126,7 +126,7 @@ void computeSplitValue_mean(const BV& bv, Vec3f* vertices, Triangle* triangles,
}
template<typename BV>
void computeSplitValue_median(const BV& bv, Vec3f* vertices, Triangle* triangles, unsigned int* primitive_indices, int num_primitives, BVHModelType type, const Vec3f& split_vector, FCL_REAL& split_value)
void computeSplitValue_median(const BV&, Vec3f* vertices, Triangle* triangles, unsigned int* primitive_indices, int num_primitives, BVHModelType type, const Vec3f& split_vector, FCL_REAL& split_value)
{
std::vector<FCL_REAL> proj(num_primitives);
......@@ -168,7 +168,7 @@ void computeSplitValue_median(const BV& bv, Vec3f* vertices, Triangle* triangles
}
template<>
void BVSplitter<OBB>::computeRule_bvcenter(const OBB& bv, unsigned int* primitive_indices, int num_primitives)
void BVSplitter<OBB>::computeRule_bvcenter(const OBB& bv, unsigned int*, int)
{
computeSplitVector<OBB>(bv, split_vector);
computeSplitValue_bvcenter<OBB>(bv, split_value);
......@@ -189,7 +189,7 @@ void BVSplitter<OBB>::computeRule_median(const OBB& bv, unsigned int* primitive_
}
template<>
void BVSplitter<RSS>::computeRule_bvcenter(const RSS& bv, unsigned int* primitive_indices, int num_primitives)
void BVSplitter<RSS>::computeRule_bvcenter(const RSS& bv, unsigned int*, int)
{
computeSplitVector<RSS>(bv, split_vector);
computeSplitValue_bvcenter<RSS>(bv, split_value);
......@@ -210,7 +210,7 @@ void BVSplitter<RSS>::computeRule_median(const RSS& bv, unsigned int* primitive_
}
template<>
void BVSplitter<kIOS>::computeRule_bvcenter(const kIOS& bv, unsigned int* primitive_indices, int num_primitives)
void BVSplitter<kIOS>::computeRule_bvcenter(const kIOS& bv, unsigned int*, int)
{
computeSplitVector<kIOS>(bv, split_vector);
computeSplitValue_bvcenter<kIOS>(bv, split_value);
......@@ -231,7 +231,8 @@ void BVSplitter<kIOS>::computeRule_median(const kIOS& bv, unsigned int* primitiv
}
template<>
void BVSplitter<OBBRSS>::computeRule_bvcenter(const OBBRSS& bv, unsigned int* primitive_indices, int num_primitives)
void BVSplitter<OBBRSS>::computeRule_bvcenter
(const OBBRSS& bv, unsigned int*, int)
{
computeSplitVector<OBBRSS>(bv, split_vector);
computeSplitValue_bvcenter<OBBRSS>(bv, split_value);
......
......@@ -465,7 +465,7 @@ void computeBV<OBB, Convex>(const Convex& s, const Transform3f& tf, OBB& bv)
}
template<>
void computeBV<OBB, Halfspace>(const Halfspace& s, const Transform3f&, OBB& bv)
void computeBV<OBB, Halfspace>(const Halfspace&, const Transform3f&, OBB& bv)
{
/// Half space can only have very rough OBB
bv.axes.setIdentity();
......
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