Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
iMSTK
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
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
Ben Boeckel
iMSTK
Commits
7ac011f6
Commit
7ac011f6
authored
2 years ago
by
Harald Scheirich
Browse files
Options
Downloads
Patches
Plain Diff
BUG: Remove superflous class
parent
00f19abf
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
Examples/PBD/PBDTissueVolumeNeedleContact/NeedleEmbeddedCH.h
+1
-53
1 addition, 53 deletions
Examples/PBD/PBDTissueVolumeNeedleContact/NeedleEmbeddedCH.h
with
1 addition
and
53 deletions
Examples/PBD/PBDTissueVolumeNeedleContact/NeedleEmbeddedCH.h
+
1
−
53
View file @
7ac011f6
...
...
@@ -22,6 +22,7 @@
#pragma once
#include
"imstkCollisionHandling.h"
#include
"imstkSurfaceMesh.h"
#include
"imstkMacros.h"
#include
<unordered_map>
...
...
@@ -36,59 +37,6 @@ class PbdCollisionConstraint;
using
namespace
imstk
;
///
/// \brief Sorts and test equivalence of a set of vertex indices
///
struct
TriCell
{
std
::
uint32_t
vertexIds
[
3
];
TriCell
(
std
::
uint32_t
id0
,
std
::
uint32_t
id1
,
std
::
uint32_t
id2
)
{
vertexIds
[
0
]
=
id0
;
vertexIds
[
1
]
=
id1
;
vertexIds
[
2
]
=
id2
;
if
(
vertexIds
[
0
]
>
vertexIds
[
1
])
{
std
::
swap
(
vertexIds
[
0
],
vertexIds
[
1
]);
}
if
(
vertexIds
[
1
]
>
vertexIds
[
2
])
{
std
::
swap
(
vertexIds
[
1
],
vertexIds
[
2
]);
}
if
(
vertexIds
[
0
]
>
vertexIds
[
1
])
{
std
::
swap
(
vertexIds
[
0
],
vertexIds
[
1
]);
}
}
// Test true equivalence
bool
operator
==
(
const
TriCell
&
other
)
const
{
// Only works if sorted
return
(
vertexIds
[
0
]
==
other
.
vertexIds
[
0
]
&&
vertexIds
[
1
]
==
other
.
vertexIds
[
1
]
&&
vertexIds
[
2
]
==
other
.
vertexIds
[
2
]);
}
};
namespace
std
{
template
<
>
struct
hash
<
TriCell
>
{
// A 128 int could garuntee no collisions but its harder to find support for
std
::
size_t
operator
()(
const
TriCell
&
k
)
const
{
using
std
::
size_t
;
using
std
::
hash
;
// Assuming sorted
const
std
::
size_t
r
=
symCantor
(
static_cast
<
size_t
>
(
k
.
vertexIds
[
0
]),
static_cast
<
size_t
>
(
k
.
vertexIds
[
1
]));
return
symCantor
(
r
,
static_cast
<
size_t
>
(
k
.
vertexIds
[
2
]));
}
};
}
// namespace std
///
/// \class NeedleEmbeddedCH
///
...
...
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