Commit c7b38617 authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Fix gcc warnings

parent 9e9f5359
......@@ -71,7 +71,7 @@ public:
/// @brief Check collision between two OBB and return the overlap part. For OBB, the overlap_part return value is NOT used as the overlap part of two obbs usually is not an obb.
bool overlap(const OBB& other, OBB& overlap_part) const
bool overlap(const OBB& other, OBB& /*overlap_part*/) const
{
return overlap(other);
}
......
......@@ -72,7 +72,7 @@ public:
}
/// @brief Check collision between two OBBRSS and return the overlap part.
bool overlap(const OBBRSS& other, OBBRSS& overlap_part) const
bool overlap(const OBBRSS& other, OBBRSS& /*overlap_part*/) const
{
return overlap(other);
}
......
......@@ -67,7 +67,7 @@ public:
bool overlap(const RSS& other) const;
/// Not implemented
bool overlap(const RSS& other, FCL_REAL& sqrDistLowerBound) const
bool overlap(const RSS& /*other*/, FCL_REAL& /*sqrDistLowerBound*/) const
{
throw std::runtime_error ("Not implemented.");
return false;
......@@ -75,7 +75,7 @@ public:
/// @brief Check collision between two RSS and return the overlap part.
/// For RSS, we return nothing, as the overlap part of two RSSs usually is not a RSS.
bool overlap(const RSS& other, RSS& overlap_part) const
bool overlap(const RSS& other, RSS& /*overlap_part*/) const
{
return overlap(other);
}
......
......@@ -69,7 +69,7 @@ class kIOS
}
else /** spheres partially overlapping or disjoint */
{
float dist = std::sqrt(dist2);
float dist = (float)std::sqrt(dist2);
kIOS_Sphere s;
s.r = dist + s0.r + s1.r;
if(dist > 0)
......@@ -99,7 +99,7 @@ public:
/// @brief Check collision between two kIOS and return the overlap part.
/// For kIOS, we return nothing, as the overlappart of two kIOS usually is not an kIOS
/// @todo Not efficient. It first checks the sphere collisions and then use OBB for further culling.
bool overlap(const kIOS& other, kIOS& overlap_part) const
bool overlap(const kIOS& other, kIOS& /*overlap_part*/) const
{
return overlap(other);
}
......
......@@ -54,7 +54,7 @@ enum BVHBuildState
BVH_BUILD_STATE_PROCESSED, /// after tree has been build, ready for cd use
BVH_BUILD_STATE_UPDATE_BEGUN, /// after beginUpdateModel(), state for updating geometry primitives
BVH_BUILD_STATE_UPDATED, /// after tree has been build for updated geometry, ready for ccd use
BVH_BUILD_STATE_REPLACE_BEGUN, /// after beginReplaceModel(), state for replacing geometry primitives
BVH_BUILD_STATE_REPLACE_BEGUN /// after beginReplaceModel(), state for replacing geometry primitives
};
/// @brief Error code for BVH
......
......@@ -85,13 +85,13 @@ public:
virtual void update() = 0;
/// @brief update the manager by explicitly given the object updated
virtual void update(CollisionObject* updated_obj)
virtual void update(CollisionObject* /*updated_obj*/)
{
update();
}
/// @brief update the manager by explicitly given the set of objects update
virtual void update(const std::vector<CollisionObject*>& updated_objs)
virtual void update(const std::vector<CollisionObject*>& /*updated_objs*/)
{
update();
}
......@@ -184,13 +184,13 @@ public:
virtual void update() = 0;
/// @brief update the manager by explicitly given the object updated
virtual void update(ContinuousCollisionObject* updated_obj)
virtual void update(ContinuousCollisionObject* /*updated_obj*/)
{
update();
}
/// @brief update the manager by explicitly given the set of objects update
virtual void update(const std::vector<ContinuousCollisionObject*>& updated_objs)
virtual void update(const std::vector<ContinuousCollisionObject*>& /*updated_objs*/)
{
update();
}
......
......@@ -88,7 +88,7 @@ public:
tf_ = tf;
}
void getTaylorModel(TMatrix3& tm, TVector3& tv) const
void getTaylorModel(TMatrix3& /*tm*/, TVector3& /*tv*/) const
{
}
......@@ -113,14 +113,14 @@ public:
const Vec3f& Rd0, const Vec3f& Rd1, const Vec3f& Rd2, const Vec3f& Rd3);
// @brief Construct motion from initial and goal transform
SplineMotion(const Matrix3f& R1, const Vec3f& T1,
const Matrix3f& R2, const Vec3f& T2) : MotionBase()
SplineMotion(const Matrix3f& /*R1*/, const Vec3f& /*T1*/,
const Matrix3f& /*R2*/, const Vec3f& /*T2*/) : MotionBase()
{
// TODO
}
SplineMotion(const Transform3f& tf1,
const Transform3f& tf2) : MotionBase()
SplineMotion(const Transform3f& /*tf1*/,
const Transform3f& /*tf2*/) : MotionBase()
{
// TODO
}
......
......@@ -72,11 +72,11 @@ class TBVMotionBoundVisitor : public BVMotionBoundVisitor
public:
TBVMotionBoundVisitor(const BV& bv_, const Vec3f& n_) : bv(bv_), n(n_) {}
virtual FCL_REAL visit(const MotionBase& motion) const { return 0; }
virtual FCL_REAL visit(const SplineMotion& motion) const { return 0; }
virtual FCL_REAL visit(const ScrewMotion& motion) const { return 0; }
virtual FCL_REAL visit(const InterpMotion& motion) const { return 0; }
virtual FCL_REAL visit(const TranslationMotion& motion) const { return 0; }
virtual FCL_REAL visit(const MotionBase& /*motion*/) const { return 0; }
virtual FCL_REAL visit(const SplineMotion& /*motion*/) const { return 0; }
virtual FCL_REAL visit(const ScrewMotion& /*motion*/) const { return 0; }
virtual FCL_REAL visit(const InterpMotion& /*motion*/) const { return 0; }
virtual FCL_REAL visit(const TranslationMotion& /*motion*/) const { return 0; }
protected:
BV bv;
......@@ -102,7 +102,7 @@ public:
TriangleMotionBoundVisitor(const Vec3f& a_, const Vec3f& b_, const Vec3f& c_, const Vec3f& n_) :
a(a_), b(b_), c(c_), n(n_) {}
virtual FCL_REAL visit(const MotionBase& motion) const { return 0; }
virtual FCL_REAL visit(const MotionBase& /*motion*/) const { return 0; }
virtual FCL_REAL visit(const SplineMotion& motion) const;
virtual FCL_REAL visit(const ScrewMotion& motion) const;
virtual FCL_REAL visit(const InterpMotion& motion) const;
......
......@@ -209,12 +209,12 @@ struct GJKSolver_libccd
}
void enableCachedGuess(bool if_enable) const
void enableCachedGuess(bool /*if_enable*/) const
{
// TODO: need change libccd to exploit spatial coherence
}
void setCachedGuess(const Vec3f& guess) const
void setCachedGuess(const Vec3f& /*guess*/) const
{
// TODO: need change libccd to exploit spatial coherence
}
......
......@@ -271,7 +271,7 @@ public:
FCL_REAL* plane_dis_,
int num_planes_,
Vec3f* points_,
int num_points_,
int /*num_points_*/,
int* polygons_) : ShapeBase()
{
plane_normals = plane_normals_;
......
......@@ -106,7 +106,7 @@ public:
virtual bool BVTesting(int b1, int b2, FCL_REAL& sqrDistLowerBound) const = 0;
/// @brief Leaf test between node b1 and b2, if they are both leafs
virtual void leafTesting(int b1, int b2, FCL_REAL& sqrDistLowerBound) const
virtual void leafTesting(int /*b1*/, int /*b2*/, FCL_REAL& /*sqrDistLowerBound*/) const
{
throw std::runtime_error ("Not implemented");
}
......
......@@ -723,7 +723,7 @@ public:
}
/// @brief BV culling test in one BVTT node
FCL_REAL BVTesting(int b1, int b2) const
FCL_REAL BVTesting(int b1, int /*b2*/) const
{
return model1->getBV(b1).bv.distance(model2_bv);
}
......@@ -803,7 +803,7 @@ public:
}
/// @brief Distance testing between leaves (one triangle and one shape)
void leafTesting(int b1, int b2) const
void leafTesting(int b1, int /*b2*/) const
{
if(this->enable_statistics) this->num_leaf_tests++;
......@@ -987,7 +987,7 @@ public:
}
FCL_REAL BVTesting(int b1, int b2) const
FCL_REAL BVTesting(int b1, int /*b2*/) const
{
if(this->enable_statistics) this->num_bv_tests++;
return distance(this->tf1.getRotation(), this->tf1.getTranslation(), this->model2_bv, this->model1->getBV(b1).bv);
......
......@@ -610,7 +610,7 @@ OBB OBB::operator + (const OBB& other) const
}
FCL_REAL OBB::distance(const OBB& other, Vec3f* P, Vec3f* Q) const
FCL_REAL OBB::distance(const OBB& /*other*/, Vec3f* /*P*/, Vec3f* /*Q*/) const
{
std::cerr << "OBB distance not implemented!" << std::endl;
return 0.0;
......
......@@ -63,7 +63,7 @@ bool kIOS::overlap(const kIOS& other) const
return true;
}
bool kIOS::overlap(const kIOS& other, FCL_REAL& sqrDistLowerBound) const
bool kIOS::overlap(const kIOS& /*other*/, FCL_REAL& /*sqrDistLowerBound*/) const
{
throw std::runtime_error ("Not implemented yet.");
}
......
......@@ -84,7 +84,7 @@ FCL_REAL InterpolationLinear::getMovementLengthBound(FCL_REAL time) const
return getValueUpperBound() - getValue(time);
}
FCL_REAL InterpolationLinear::getVelocityBound(FCL_REAL time) const
FCL_REAL InterpolationLinear::getVelocityBound(FCL_REAL /*time*/) const
{
return (value_1_ - value_0_);
}
......
......@@ -50,7 +50,7 @@ CollisionFunctionMatrix<GJKSolver>& getCollisionFunctionLookTable()
{
static CollisionFunctionMatrix<GJKSolver> table;
return table;
};
}
template<typename NarrowPhaseSolver>
std::size_t collide(const CollisionObject* o1, const CollisionObject* o2,
......
......@@ -280,7 +280,7 @@ FCL_REAL BVHDistance<OBBRSS>(const CollisionGeometry* o1, const Transform3f& tf1
template<typename T_BVH, typename NarrowPhaseSolver>
FCL_REAL BVHDistance(const CollisionGeometry* o1, const Transform3f& tf1, const CollisionGeometry* o2, const Transform3f& tf2,
const NarrowPhaseSolver* nsolver,
const NarrowPhaseSolver* /*nsolver*/,
const DistanceRequest& request, DistanceResult& result)
{
return BVHDistance<T_BVH>(o1, tf1, o2, tf2, request, result);
......
......@@ -2416,7 +2416,7 @@ bool halfspacePlaneIntersect(const Halfspace& s1, const Transform3f& tf1,
bool planeIntersect(const Plane& s1, const Transform3f& tf1,
const Plane& s2, const Transform3f& tf2,
Vec3f* contact_points, FCL_REAL* penetration_depth, Vec3f* normal)
Vec3f* /*contact_points*/, FCL_REAL* /*penetration_depth*/, Vec3f* /*normal*/)
{
Plane new_s1 = transform(s1, tf1);
Plane new_s2 = transform(s2, tf2);
......@@ -2583,7 +2583,7 @@ bool GJKSolver_libccd::shapeIntersect<Halfspace, Cone>(const Halfspace& s1, cons
template<>
bool GJKSolver_libccd::shapeIntersect<Halfspace, Halfspace>(const Halfspace& s1, const Transform3f& tf1,
const Halfspace& s2, const Transform3f& tf2,
Vec3f* contact_points, FCL_REAL* penetration_depth, Vec3f* normal) const
Vec3f* /*contact_points*/, FCL_REAL* /*penetration_depth*/, Vec3f* /*normal*/) const
{
Halfspace s;
Vec3f p, d;
......@@ -2595,7 +2595,7 @@ bool GJKSolver_libccd::shapeIntersect<Halfspace, Halfspace>(const Halfspace& s1,
template<>
bool GJKSolver_libccd::shapeIntersect<Plane, Halfspace>(const Plane& s1, const Transform3f& tf1,
const Halfspace& s2, const Transform3f& tf2,
Vec3f* contact_points, FCL_REAL* penetration_depth, Vec3f* normal) const
Vec3f* /*contact_points*/, FCL_REAL* /*penetration_depth*/, Vec3f* /*normal*/) const
{
Plane pl;
Vec3f p, d;
......@@ -2607,7 +2607,7 @@ bool GJKSolver_libccd::shapeIntersect<Plane, Halfspace>(const Plane& s1, const T
template<>
bool GJKSolver_libccd::shapeIntersect<Halfspace, Plane>(const Halfspace& s1, const Transform3f& tf1,
const Plane& s2, const Transform3f& tf2,
Vec3f* contact_points, FCL_REAL* penetration_depth, Vec3f* normal) const
Vec3f* /*contact_points*/, FCL_REAL* /*penetration_depth*/, Vec3f* /*normal*/) const
{
Plane pl;
Vec3f p, d;
......@@ -2792,9 +2792,9 @@ bool GJKSolver_libccd::shapeDistance<Sphere, Sphere>(const Sphere& s1, const Tra
}
template<>
bool GJKSolver_libccd::shapeDistance<Capsule, Capsule>(const Capsule& s1, const Transform3f& tf1,
const Capsule& s2, const Transform3f& tf2,
FCL_REAL* dist, Vec3f* p1, Vec3f* p2) const
bool GJKSolver_libccd::shapeDistance<Capsule, Capsule>(const Capsule& /*s1*/, const Transform3f& /*tf1*/,
const Capsule& /*s2*/, const Transform3f& /*tf2*/,
FCL_REAL* /*dist*/, Vec3f* /*p1*/, Vec3f* /*p2*/) const
{
abort ();
}
......@@ -2967,7 +2967,7 @@ bool GJKSolver_indep::shapeIntersect<Halfspace, Cone>(const Halfspace& s1, const
template<>
bool GJKSolver_indep::shapeIntersect<Halfspace, Halfspace>(const Halfspace& s1, const Transform3f& tf1,
const Halfspace& s2, const Transform3f& tf2,
Vec3f* contact_points, FCL_REAL* penetration_depth, Vec3f* normal) const
Vec3f* /*contact_points*/, FCL_REAL* /*penetration_depth*/, Vec3f* /*normal*/) const
{
Halfspace s;
Vec3f p, d;
......@@ -2979,7 +2979,7 @@ bool GJKSolver_indep::shapeIntersect<Halfspace, Halfspace>(const Halfspace& s1,
template<>
bool GJKSolver_indep::shapeIntersect<Plane, Halfspace>(const Plane& s1, const Transform3f& tf1,
const Halfspace& s2, const Transform3f& tf2,
Vec3f* contact_points, FCL_REAL* penetration_depth, Vec3f* normal) const
Vec3f* /*contact_points*/, FCL_REAL* /*penetration_depth*/, Vec3f* /*normal*/) const
{
Plane pl;
Vec3f p, d;
......@@ -2991,7 +2991,7 @@ bool GJKSolver_indep::shapeIntersect<Plane, Halfspace>(const Plane& s1, const Tr
template<>
bool GJKSolver_indep::shapeIntersect<Halfspace, Plane>(const Halfspace& s1, const Transform3f& tf1,
const Plane& s2, const Transform3f& tf2,
Vec3f* contact_points, FCL_REAL* penetration_depth, Vec3f* normal) const
Vec3f* /*contact_points*/, FCL_REAL* /*penetration_depth*/, Vec3f* /*normal*/) const
{
Plane pl;
Vec3f p, d;
......@@ -3176,9 +3176,9 @@ bool GJKSolver_indep::shapeDistance<Sphere, Sphere>(const Sphere& s1, const Tran
}
template<>
bool GJKSolver_indep::shapeDistance<Capsule, Capsule>(const Capsule& s1, const Transform3f& tf1,
const Capsule& s2, const Transform3f& tf2,
FCL_REAL* dist, Vec3f* p1, Vec3f* p2) const
bool GJKSolver_indep::shapeDistance<Capsule, Capsule>(const Capsule& /*s1*/, const Transform3f& /*tf1*/,
const Capsule& /*s2*/, const Transform3f& /*tf2*/,
FCL_REAL* /*dist*/, Vec3f* /*p1*/, Vec3f* /*p2*/) const
{
abort ();
}
......
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