Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hpp-fcl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Guilhem Saurel
hpp-fcl
Commits
c3aee6fb
Commit
c3aee6fb
authored
9 years ago
by
Valenza Florian
Browse files
Options
Downloads
Patches
Plain Diff
Provide operator == in CollisionResult, CostSource and Contact
parent
6101e6cb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/hpp/fcl/collision_data.h
+27
-0
27 additions, 0 deletions
include/hpp/fcl/collision_data.h
with
27 additions
and
0 deletions
include/hpp/fcl/collision_data.h
+
27
−
0
View file @
c3aee6fb
...
...
@@ -119,6 +119,17 @@ struct Contact
return
b2
<
other
.
b2
;
return
b1
<
other
.
b1
;
}
bool
operator
==
(
const
Contact
&
other
)
const
{
return
o1
==
other
.
o1
&&
o2
==
other
.
o2
&&
b1
==
other
.
b1
&&
b2
==
other
.
b2
&&
normal
==
other
.
normal
&&
pos
==
other
.
pos
&&
penetration_depth
==
other
.
penetration_depth
;
}
};
/// @brief Cost source describes an area with a cost. The area is described by an AABB region.
...
...
@@ -169,6 +180,14 @@ struct CostSource
return
false
;
}
bool
operator
==
(
const
CostSource
&
other
)
const
{
return
aabb_min
==
other
.
aabb_min
&&
aabb_max
==
other
.
aabb_max
&&
cost_density
==
other
.
cost_density
&&
total_cost
==
other
.
total_cost
;
}
};
struct
CollisionResult
;
...
...
@@ -262,6 +281,14 @@ public:
cost_sources
.
erase
(
--
cost_sources
.
end
());
}
/// @brief whether two CollisionResult are the same or not
inline
bool
operator
==
(
const
CollisionResult
&
other
)
const
{
return
contacts
==
other
.
contacts
&&
cost_sources
==
other
.
cost_sources
&&
distance_lower_bound
==
other
.
distance_lower_bound
;
}
/// @brief return binary collision result
bool
isCollision
()
const
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment