Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
loco-3d
Multicontact-api
Commits
806deca9
Commit
806deca9
authored
May 07, 2020
by
Pierre Fernbach
Browse files
[Tests] add test case to access contact_model from contact_patch
parent
a557040a
Changes
1
Hide whitespace changes
Inline
Side-by-side
unittest/scenario.cpp
View file @
806deca9
...
...
@@ -485,7 +485,16 @@ BOOST_AUTO_TEST_CASE(contact_patch) {
cp5
.
friction
()
=
2.
;
BOOST_CHECK
(
cp4
!=
cp5
);
ContactPatch
cp6
(
cp4
);
BOOST_CHECK
(
cp4
==
cp6
);
ContactModel
mp1
(
cp4
.
friction
(),
ContactType
::
CONTACT_PLANAR
);
Matrix3X
positions
=
Matrix3X
::
Random
(
3
,
4
);
mp1
.
contact_points_positions
(
positions
);
cp6
.
m_contact_model
=
mp1
;
BOOST_CHECK
(
cp4
!=
cp6
);
// serialization :
cp3
.
m_contact_model
=
mp1
;
std
::
string
fileName
(
"fileTest"
);
cp3
.
saveAsText
(
fileName
);
ContactPatch
cp_from_text
;
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment