Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CGoGN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
CGoGN
CGoGN
Commits
b2f787bd
Commit
b2f787bd
authored
Jan 23, 2013
by
Thomas Jund
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correction of isPointInTetrahedron
parent
e22e5a64
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
19 deletions
+26
-19
include/Algo/Geometry/orientation.h
include/Algo/Geometry/orientation.h
+5
-0
include/Algo/Geometry/plane.h
include/Algo/Geometry/plane.h
+5
-0
include/Geometry/inclusion.hpp
include/Geometry/inclusion.hpp
+15
-17
include/Topology/generic/dartmarker.h
include/Topology/generic/dartmarker.h
+1
-2
No files found.
include/Algo/Geometry/orientation.h
View file @
b2f787bd
...
...
@@ -34,6 +34,9 @@ namespace CGoGN
namespace
Algo
{
namespace
Surface
{
namespace
Geometry
{
...
...
@@ -53,6 +56,8 @@ bool isTetrahedronWellOriented(typename PFP::MAP& map, Dart d, const VertexAttri
}
// namespace Geometry
}
// namespace Surface
}
// namespace Algo
}
// namespace CGoGN
...
...
include/Algo/Geometry/plane.h
View file @
b2f787bd
...
...
@@ -35,6 +35,9 @@ namespace CGoGN
namespace
Algo
{
namespace
Surface
{
namespace
Geometry
{
...
...
@@ -61,6 +64,8 @@ Geom::Plane3D<typename PFP::REAL> vertexTangentPlane(typename PFP::MAP& map, Dar
}
// namespace Geometry
}
// namespace Surface
}
// namespace Algo
}
// namespace CGoGN
...
...
include/Geometry/inclusion.hpp
View file @
b2f787bd
...
...
@@ -22,6 +22,9 @@
* *
*******************************************************************************/
#include <Eigen/Dense>
#include "Utils/convertType.h"
namespace
CGoGN
{
...
...
@@ -128,23 +131,18 @@ bool isPointInTetrahedron(VEC3 points[4], VEC3& point, bool CCW)
VEC3
AB
=
points
[
1
]
-
points
[
0
]
;
VEC3
AC
=
points
[
2
]
-
points
[
0
]
;
VEC3
AD
=
points
[
3
]
-
points
[
0
]
;
VEC3
BD
=
points
[
3
]
-
points
[
1
]
;
VEC3
BC
=
points
[
2
]
-
points
[
1
]
;
VEC3
nABC
=
AB
^
AC
;
VEC3
nACD
=
AC
^
AD
;
VEC3
nADB
=
AD
^
AB
;
VEC3
nBDC
=
BD
^
BC
;
T
d0
=
nABC
*
(
point
-
points
[
0
])
;
T
d1
=
nACD
*
(
point
-
points
[
0
])
;
T
d2
=
nADB
*
(
point
-
points
[
0
])
;
T
d3
=
nBDC
*
(
point
-
points
[
1
])
;
if
(
CCW
)
return
(
d0
<
0
&&
d1
<
0
&&
d2
<
0
&&
d3
<
0
)
;
else
return
(
d0
>
0
&&
d1
>
0
&&
d2
>
0
&&
d3
>
0
)
;
Eigen
::
Matrix3f
A
;
A
<<
AB
[
0
],
AB
[
1
],
AB
[
2
],
AC
[
0
],
AC
[
1
],
AC
[
2
],
AD
[
0
],
AD
[
1
],
AD
[
2
];
A
=
A
.
inverse
();
VEC3
v1
(
point
-
points
[
0
]);
Eigen
::
Vector3f
&
v
=
Utils
::
convertRef
<
Eigen
::
Vector3f
>
(
v1
);
Eigen
::
Vector3f
beta
=
A
*
v
;
return
(
beta
[
0
]
>=
0.0
f
&&
beta
[
1
]
>=
0.0
f
&&
beta
[
2
]
>=
0.0
f
&&
beta
[
0
]
+
beta
[
1
]
+
beta
[
2
]
<=
1.0
f
);
}
template
<
typename
VEC3
>
...
...
include/Topology/generic/dartmarker.h
View file @
b2f787bd
...
...
@@ -312,8 +312,7 @@ public:
void
unmarkAll
()
{
assert
(
m_map
.
getMarkerSet
<
DART
>
(
m_thread
).
testMark
(
m_mark
));
for
(
std
::
vector
<
unsigned
int
>::
iterator
it
=
m_markedDarts
.
begin
();
it
!=
m_markedDarts
.
end
();
++
it
)
for
(
std
::
vector
<
unsigned
int
>::
iterator
it
=
m_markedDarts
.
begin
();
it
!=
m_markedDarts
.
end
();
++
it
)
m_markVector
->
operator
[](
*
it
).
unsetMark
(
m_mark
)
;
}
}
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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