Verified Commit 02097412 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

core: add enable_timings in QueryRequest

This will allows to enable/disable this feature if needed
parent 22e6ff9c
......@@ -145,11 +145,15 @@ struct HPP_FCL_DLLAPI QueryRequest
/// @brief the support function intial guess set by user
support_func_guess_t cached_support_func_guess;
/// @brief enable timings when performing collision/distance request
bool enable_timings;
QueryRequest () :
enable_cached_gjk_guess (false),
cached_gjk_guess (1,0,0),
cached_support_func_guess(support_func_guess_t::Zero())
cached_support_func_guess(support_func_guess_t::Zero()),
enable_timings(false)
{}
void updateGuess(const QueryResult& result);
......@@ -159,7 +163,8 @@ struct HPP_FCL_DLLAPI QueryRequest
{
return enable_cached_gjk_guess == other.enable_cached_gjk_guess
&& cached_gjk_guess == other.cached_gjk_guess
&& cached_support_func_guess == other.cached_support_func_guess;
&& cached_support_func_guess == other.cached_support_func_guess
&& enable_timings == other.enable_timings;
}
};
......
......@@ -49,6 +49,7 @@ namespace boost
ar & make_nvp("enable_cached_gjk_guess",query_request.enable_cached_gjk_guess);
ar & make_nvp("cached_gjk_guess",query_request.cached_gjk_guess);
ar & make_nvp("cached_support_func_guess",query_request.cached_support_func_guess);
ar & make_nvp("enable_timings",query_request.enable_timings);
}
template <class Archive>
......
......@@ -98,6 +98,7 @@ void exposeCollisionAPI ()
.DEF_RW_CLASS_ATTRIB (QueryRequest, enable_cached_gjk_guess )
.DEF_RW_CLASS_ATTRIB (QueryRequest, cached_gjk_guess )
.DEF_RW_CLASS_ATTRIB (QueryRequest, cached_support_func_guess )
.DEF_RW_CLASS_ATTRIB (QueryRequest, enable_timings )
.DEF_CLASS_FUNC (QueryRequest, updateGuess)
;
}
......
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