Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
David Cazier
CGoGN
Commits
5bb529c8
Commit
5bb529c8
authored
Jun 15, 2011
by
Pierre Kraemer
Browse files
correction vertexRaySelection
parent
695d8500
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/Algo/Selection/raySelector.h
View file @
5bb529c8
...
...
@@ -170,7 +170,7 @@ void verticesRaySelection(typename PFP::MAP& map, const typename PFP::TVEC3& pos
* @param map the map we want to test
* @param rayA first point of ray (user side)
* @param rayAB vector of ray (directed ot the scene)
* @param vertex (out) dart of selected vertex (set to
map.end()
if no vertex selected)
* @param vertex (out) dart of selected vertex (set to
NIL
if no vertex selected)
*/
template
<
typename
PFP
>
void
vertexRaySelection
(
typename
PFP
::
MAP
&
map
,
const
typename
PFP
::
TVEC3
&
position
,
const
typename
PFP
::
VEC3
&
rayA
,
const
typename
PFP
::
VEC3
&
rayAB
,
Dart
&
vertex
,
const
FunctorSelect
&
good
=
SelectorTrue
())
...
...
@@ -191,9 +191,8 @@ void vertexRaySelection(typename PFP::MAP& map, const typename PFP::TVEC3& posit
distnint
.
resize
(
nbi
);
for
(
unsigned
int
i
=
0
;
i
<
nbi
;
++
i
)
{
distnint
[
i
].
first
=
(
iPoints
[
i
]
-
rayA
).
norm2
();
distnint
[
i
].
second
=
i
;
typename
PFP
::
VEC3
V
=
iPoints
[
i
]
-
rayA
;
distnint
[
i
].
first
=
V
.
norm2
();
}
// sort the vector of pair dist/dart
...
...
@@ -207,6 +206,7 @@ void vertexRaySelection(typename PFP::MAP& map, const typename PFP::TVEC3& posit
Dart
d
=
vecFaces
[
first
];
Dart
it
=
d
;
typename
PFP
::
REAL
minDist
=
(
ip
-
position
[
it
]).
norm2
();
vertex
=
it
;
it
=
map
.
phi1
(
it
);
while
(
it
!=
d
)
{
...
...
@@ -220,7 +220,7 @@ void vertexRaySelection(typename PFP::MAP& map, const typename PFP::TVEC3& posit
}
}
else
vertex
=
map
.
end
()
;
vertex
=
NIL
;
}
/**
...
...
include/Topology/generic/genericmap.h
View file @
5bb529c8
...
...
@@ -33,8 +33,8 @@
#include
<vector>
#include
<map>
#include
"Container/attributeContainer.h"
#include
"Topology/generic/dart.h"
#include
"Topology/generic/marker.h"
#include
"Topology/generic/functor.h"
...
...
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