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
Hurstel
CGoGN
Commits
54850cac
Commit
54850cac
authored
Nov 05, 2013
by
Pierre Kraemer
Browse files
update selection plugin
parent
046c3ab1
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
SCHNApps/Plugins/surface_selection/include/surface_selection.h
View file @
54850cac
...
...
@@ -81,12 +81,16 @@ protected:
Utils
::
PointSprite
*
m_pointSprite
;
Utils
::
Drawer
*
m_drawer
;
// cell under the mouse when selecting
Dart
m_selectingVertex
;
Dart
m_selectingEdge
;
Dart
m_selectingFace
;
// selected cells drawing
Utils
::
VBO
*
m_selectedVerticesVBO
;
// WithinSphere parameters
Utils
::
VBO
*
m_selectionSphereVBO
;
PFP2
::
VEC3
m_selectionCenter
;
PFP2
::
REAL
m_selectionRadius
;
};
...
...
SCHNApps/Plugins/surface_selection/src/surface_selection.cpp
View file @
54850cac
...
...
@@ -75,25 +75,23 @@ void Surface_Selection_Plugin::drawMap(View* view, MapHandlerGen* map)
if
(
selector
)
{
const
std
::
vector
<
Dart
>&
selectedCells
=
selector
->
getSelectedCells
();
unsigned
int
nbCells
=
map
->
getGenericMap
()
->
getNbCells
(
orbit
);
switch
(
orbit
)
{
case
VERTEX
:
{
m_pointSprite
->
setAttributePosition
(
m_selectedVerticesVBO
);
m_pointSprite
->
setSize
(
map
->
getBBdiagSize
()
/
500.0
f
);
m_pointSprite
->
setSize
(
20
*
map
->
getBBdiagSize
()
/
nbCells
);
m_pointSprite
->
setColor
(
CGoGN
::
Geom
::
Vec4f
(
1.0
f
,
0.0
f
,
0.0
f
,
1.0
f
));
m_pointSprite
->
setLightPosition
(
CGoGN
::
Geom
::
Vec3f
(
0.0
f
,
0.0
f
,
1.0
f
));
m_pointSprite
->
enableVertexAttribs
();
glEnable
(
GL_BLEND
);
glBlendFunc
(
GL_SRC_ALPHA
,
GL_ONE_MINUS_SRC_ALPHA
);
glDrawArrays
(
GL_POINTS
,
0
,
selectedCells
.
size
());
glDisable
(
GL_BLEND
);
m_pointSprite
->
disableVertexAttribs
();
if
(
m_selecting
)
if
(
m_selecting
&&
m_selectingVertex
!=
NIL
)
{
std
::
vector
<
PFP2
::
VEC3
>
selectionPoint
;
selectionPoint
.
push_back
(
m_selectionCenter
);
selectionPoint
.
push_back
(
p
.
positionAttribute
[
m_selectingVertex
]
);
m_selectionSphereVBO
->
updateData
(
selectionPoint
);
m_pointSprite
->
setAttributePosition
(
m_selectionSphereVBO
);
...
...
@@ -103,7 +101,7 @@ void Surface_Selection_Plugin::drawMap(View* view, MapHandlerGen* map)
switch
(
p
.
selectionMethod
)
{
case
SingleCell
:
{
m_pointSprite
->
setSize
(
map
->
getBBdiagSize
()
/
250.0
f
);
m_pointSprite
->
setSize
(
30
*
map
->
getBBdiagSize
()
/
nbCells
);
break
;
}
case
WithinSphere
:
{
...
...
@@ -122,9 +120,77 @@ void Surface_Selection_Plugin::drawMap(View* view, MapHandlerGen* map)
break
;
}
case
EDGE
:
{
PFP2
::
MAP
*
m
=
static_cast
<
MapHandler
<
PFP2
>*>
(
map
)
->
getMap
();
m_drawer
->
newList
(
GL_COMPILE_AND_EXECUTE
);
m_drawer
->
lineWidth
(
3.0
f
);
m_drawer
->
color3f
(
1.0
f
,
0.0
f
,
0.0
f
);
m_drawer
->
begin
(
GL_LINES
);
for
(
std
::
vector
<
Dart
>::
const_iterator
it
=
selectedCells
.
begin
();
it
!=
selectedCells
.
end
();
++
it
)
{
m_drawer
->
vertex
(
p
.
positionAttribute
[
*
it
]);
m_drawer
->
vertex
(
p
.
positionAttribute
[
m
->
phi1
(
*
it
)]);
}
m_drawer
->
end
();
m_drawer
->
endList
();
if
(
m_selecting
&&
m_selectingEdge
!=
NIL
)
{
switch
(
p
.
selectionMethod
)
{
case
SingleCell
:
{
m_drawer
->
newList
(
GL_COMPILE_AND_EXECUTE
);
m_drawer
->
lineWidth
(
6.0
f
);
m_drawer
->
color3f
(
0.0
f
,
0.0
f
,
1.0
f
);
m_drawer
->
begin
(
GL_LINES
);
m_drawer
->
vertex
(
p
.
positionAttribute
[
m_selectingEdge
]);
m_drawer
->
vertex
(
p
.
positionAttribute
[
m
->
phi1
(
m_selectingEdge
)]);
m_drawer
->
end
();
m_drawer
->
endList
();
break
;
}
case
WithinSphere
:
{
break
;
}
}
}
break
;
}
case
FACE
:
{
PFP2
::
MAP
*
m
=
static_cast
<
MapHandler
<
PFP2
>*>
(
map
)
->
getMap
();
m_drawer
->
newList
(
GL_COMPILE_AND_EXECUTE
);
m_drawer
->
color3f
(
1.0
f
,
0.0
f
,
0.0
f
);
m_drawer
->
begin
(
GL_TRIANGLES
);
for
(
std
::
vector
<
Dart
>::
const_iterator
it
=
selectedCells
.
begin
();
it
!=
selectedCells
.
end
();
++
it
)
{
m_drawer
->
vertex
(
p
.
positionAttribute
[
*
it
]);
m_drawer
->
vertex
(
p
.
positionAttribute
[
m
->
phi1
(
*
it
)]);
m_drawer
->
vertex
(
p
.
positionAttribute
[
m
->
phi_1
(
*
it
)]);
}
m_drawer
->
end
();
m_drawer
->
endList
();
if
(
m_selecting
&&
m_selectingFace
!=
NIL
)
{
switch
(
p
.
selectionMethod
)
{
case
SingleCell
:
{
m_drawer
->
newList
(
GL_COMPILE_AND_EXECUTE
);
m_drawer
->
color3f
(
0.0
f
,
0.0
f
,
1.0
f
);
m_drawer
->
begin
(
GL_TRIANGLES
);
m_drawer
->
vertex
(
p
.
positionAttribute
[
m_selectingFace
]);
m_drawer
->
vertex
(
p
.
positionAttribute
[
m
->
phi1
(
m_selectingFace
)]);
m_drawer
->
vertex
(
p
.
positionAttribute
[
m
->
phi_1
(
m_selectingFace
)]);
m_drawer
->
end
();
m_drawer
->
endList
();
break
;
}
case
WithinSphere
:
{
break
;
}
}
}
break
;
}
}
...
...
@@ -163,41 +229,27 @@ void Surface_Selection_Plugin::mousePress(View* view, QMouseEvent* event)
{
unsigned
int
orbit
=
m_schnapps
->
getCurrentOrbit
();
CellSelectorGen
*
selector
=
m_schnapps
->
getSelectedSelector
(
orbit
);
if
(
selector
)
{
QPoint
pixel
(
event
->
x
(),
event
->
y
());
qglviewer
::
Vec
orig
;
qglviewer
::
Vec
dir
;
view
->
camera
()
->
convertClickToLine
(
pixel
,
orig
,
dir
);
qglviewer
::
Vec
orig_inv
=
mh
->
getFrame
()
->
coordinatesOf
(
orig
);
qglviewer
::
Vec
dir_inv
=
mh
->
getFrame
()
->
transformOf
(
dir
);
PFP2
::
VEC3
rayA
(
orig_inv
.
x
,
orig_inv
.
y
,
orig_inv
.
z
);
PFP2
::
VEC3
AB
(
dir_inv
.
x
,
dir_inv
.
y
,
dir_inv
.
z
);
Dart
d
;
PFP2
::
MAP
*
map
=
static_cast
<
MapHandler
<
PFP2
>*>
(
mh
)
->
getMap
();
switch
(
orbit
)
{
case
VERTEX
:
{
Algo
::
Selection
::
vertexRaySelection
<
PFP2
>
(
*
map
,
p
.
positionAttribute
,
rayA
,
AB
,
d
);
if
(
d
!=
NIL
)
if
(
m_selectingVertex
!=
NIL
)
{
switch
(
p
.
selectionMethod
)
{
case
SingleCell
:
{
if
(
event
->
button
()
==
Qt
::
LeftButton
)
selector
->
select
(
d
);
selector
->
select
(
m_selectingVertex
);
else
if
(
event
->
button
()
==
Qt
::
RightButton
)
selector
->
unselect
(
d
);
selector
->
unselect
(
m_selectingVertex
);
break
;
}
case
WithinSphere
:
{
Algo
::
Surface
::
Selection
::
Collector_WithinSphere
<
PFP2
>
neigh
(
*
map
,
p
.
positionAttribute
,
m_selectionRadius
);
neigh
.
collectAll
(
d
);
neigh
.
collectAll
(
m_selectingVertex
);
if
(
event
->
button
()
==
Qt
::
LeftButton
)
selector
->
select
(
neigh
.
getInsideVertices
());
else
if
(
event
->
button
()
==
Qt
::
RightButton
)
...
...
@@ -215,9 +267,41 @@ void Surface_Selection_Plugin::mousePress(View* view, QMouseEvent* event)
break
;
}
case
EDGE
:
{
if
(
m_selectingEdge
!=
NIL
)
{
switch
(
p
.
selectionMethod
)
{
case
SingleCell
:
{
if
(
event
->
button
()
==
Qt
::
LeftButton
)
selector
->
select
(
m_selectingEdge
);
else
if
(
event
->
button
()
==
Qt
::
RightButton
)
selector
->
unselect
(
m_selectingEdge
);
break
;
}
case
WithinSphere
:
{
break
;
}
}
}
break
;
}
case
FACE
:
{
if
(
m_selectingFace
!=
NIL
)
{
switch
(
p
.
selectionMethod
)
{
case
SingleCell
:
{
if
(
event
->
button
()
==
Qt
::
LeftButton
)
selector
->
select
(
m_selectingFace
);
else
if
(
event
->
button
()
==
Qt
::
RightButton
)
selector
->
unselect
(
m_selectingFace
);
break
;
}
case
WithinSphere
:
{
break
;
}
}
}
break
;
}
}
...
...
@@ -239,23 +323,39 @@ void Surface_Selection_Plugin::mouseMove(View* view, QMouseEvent* event)
const
MapParameters
&
p
=
h_parameterSet
[
mh
];
if
(
p
.
positionAttribute
.
isValid
())
{
QPoint
pixel
(
event
->
x
(),
event
->
y
());
qglviewer
::
Vec
orig
;
qglviewer
::
Vec
dir
;
view
->
camera
()
->
convertClickToLine
(
pixel
,
orig
,
dir
);
unsigned
int
orbit
=
m_schnapps
->
getCurrentOrbit
();
CellSelectorGen
*
selector
=
m_schnapps
->
getSelectedSelector
(
orbit
);
if
(
selector
)
{
QPoint
pixel
(
event
->
x
(),
event
->
y
());
qglviewer
::
Vec
orig
;
qglviewer
::
Vec
dir
;
view
->
camera
()
->
convertClickToLine
(
pixel
,
orig
,
dir
);
qglviewer
::
Vec
orig_inv
=
mh
->
getFrame
()
->
coordinatesOf
(
orig
);
qglviewer
::
Vec
dir_inv
=
mh
->
getFrame
()
->
transformOf
(
dir
);
qglviewer
::
Vec
orig_inv
=
mh
->
getFrame
()
->
coordinatesOf
(
orig
);
qglviewer
::
Vec
dir_inv
=
mh
->
getFrame
()
->
transformOf
(
dir
);
PFP2
::
VEC3
rayA
(
orig_inv
.
x
,
orig_inv
.
y
,
orig_inv
.
z
);
PFP2
::
VEC3
AB
(
dir_inv
.
x
,
dir_inv
.
y
,
dir_inv
.
z
);
PFP2
::
VEC3
rayA
(
orig_inv
.
x
,
orig_inv
.
y
,
orig_inv
.
z
);
PFP2
::
VEC3
AB
(
dir_inv
.
x
,
dir_inv
.
y
,
dir_inv
.
z
);
PFP2
::
MAP
*
map
=
static_cast
<
MapHandler
<
PFP2
>*>
(
mh
)
->
getMap
();
switch
(
orbit
)
{
case
VERTEX
:
{
Algo
::
Selection
::
vertexRaySelection
<
PFP2
>
(
*
map
,
p
.
positionAttribute
,
rayA
,
AB
,
m_selectingVertex
);
break
;
}
case
EDGE
:
{
Algo
::
Selection
::
edgeRaySelection
<
PFP2
>
(
*
map
,
p
.
positionAttribute
,
rayA
,
AB
,
m_selectingEdge
);
break
;
}
case
FACE
:
{
Algo
::
Selection
::
faceRaySelection
<
PFP2
>
(
*
map
,
p
.
positionAttribute
,
rayA
,
AB
,
m_selectingFace
);
break
;
}
}
Dart
d
;
PFP2
::
MAP
*
map
=
static_cast
<
MapHandler
<
PFP2
>*>
(
mh
)
->
getMap
();
Algo
::
Selection
::
vertexRaySelection
<
PFP2
>
(
*
map
,
p
.
positionAttribute
,
rayA
,
AB
,
d
);
if
(
d
!=
NIL
)
{
m_selectionCenter
=
p
.
positionAttribute
[
d
];
view
->
updateGL
();
}
}
...
...
SCHNApps/include/cellSelector.h
View file @
54850cac
...
...
@@ -109,11 +109,10 @@ public:
inline
void
select
(
Dart
d
,
bool
emitSignal
=
true
)
{
unsigned
int
v
=
m_map
.
getEmbedding
<
ORBIT
>
(
d
);
if
(
!
m_cm
.
isMarked
(
v
))
if
(
!
m_cm
.
isMarked
(
d
))
{
m_cells
.
push_back
(
d
);
m_cm
.
mark
(
v
);
m_cm
.
mark
(
d
);
if
(
m_isMutuallyExclusive
&&
!
m_mutuallyExclusive
.
empty
())
{
foreach
(
CellSelectorGen
*
cs
,
m_mutuallyExclusive
)
...
...
@@ -128,9 +127,9 @@ public:
inline
void
unselect
(
Dart
d
,
bool
emitSignal
=
true
)
{
unsigned
int
v
=
m_map
.
getEmbedding
<
ORBIT
>
(
d
);
if
(
m_cm
.
isMarked
(
v
))
if
(
m_cm
.
isMarked
(
d
))
{
unsigned
int
v
=
m_map
.
getEmbedding
<
ORBIT
>
(
d
);
bool
found
=
false
;
unsigned
int
i
;
for
(
i
=
0
;
i
<
m_cells
.
size
()
&&
!
found
;
++
i
)
...
...
include/Algo/Import/import.h
View file @
54850cac
...
...
@@ -54,6 +54,16 @@ namespace Import
template
<
typename
PFP
>
bool
importMesh
(
typename
PFP
::
MAP
&
map
,
const
std
::
string
&
filename
,
std
::
vector
<
std
::
string
>&
attrNames
,
bool
mergeCloseVertices
=
false
);
/**
* import a voxellisation
* @param map the map in which the function imports the mesh
* @param voxellisation
* @param attrNames attribute names
* @param mergeCloseVertices a boolean indicating if close vertices should be merged during import
* @return a boolean indicating if import was successful
*/
template
<
typename
PFP
>
bool
importVoxellisation
(
typename
PFP
::
MAP
&
map
,
Algo
::
Surface
::
Modelisation
::
Voxellisation
&
voxellisation
,
std
::
vector
<
std
::
string
>&
attrNames
,
bool
mergeCloseVertices
=
false
);
/**
* import a Choupi file
...
...
@@ -64,7 +74,6 @@ bool importMesh(typename PFP::MAP& map, const std::string& filename, std::vector
template
<
typename
PFP
>
bool
importChoupi
(
const
std
::
string
&
filename
,
const
std
::
vector
<
typename
PFP
::
VEC3
>&
tabV
,
const
std
::
vector
<
unsigned
int
>&
tabE
);
}
// namespace Import
}
// Surface
...
...
include/Algo/Import/import2tables.h
View file @
54850cac
...
...
@@ -36,6 +36,7 @@
#include
"Utils/gzstream.h"
#include
"Algo/Import/importFileTypes.h"
#include
"Algo/Modelisation/voxellisation.h"
#ifdef WITH_ASSIMP
#include
"Assimp/assimp.h"
...
...
@@ -103,9 +104,11 @@ public:
bool
importOff
(
const
std
::
string
&
filename
,
std
::
vector
<
std
::
string
>&
attrNames
);
bool
importVoxellisation
(
Algo
::
Surface
::
Modelisation
::
Voxellisation
&
voxellisation
,
std
::
vector
<
std
::
string
>&
attrNames
);
bool
importMeshBin
(
const
std
::
string
&
filename
,
std
::
vector
<
std
::
string
>&
attrNames
);
bool
importObj
(
const
std
::
string
&
filename
,
std
::
vector
<
std
::
string
>&
attrNames
);
bool
importObj
(
const
std
::
string
&
filename
,
std
::
vector
<
std
::
string
>&
attrNames
);
bool
importPly
(
const
std
::
string
&
filename
,
std
::
vector
<
std
::
string
>&
attrNames
);
...
...
include/Algo/Import/import2tablesSurface.hpp
View file @
54850cac
This diff is collapsed.
Click to expand it.
include/Algo/Import/importMesh.hpp
View file @
54850cac
...
...
@@ -155,6 +155,20 @@ bool importMesh(typename PFP::MAP& map, const std::string& filename, std::vector
return
importMesh
<
PFP
>
(
map
,
mts
);
}
template
<
typename
PFP
>
bool
importVoxellisation
(
typename
PFP
::
MAP
&
map
,
Algo
::
Surface
::
Modelisation
::
Voxellisation
&
voxellisation
,
std
::
vector
<
std
::
string
>&
attrNames
,
bool
mergeCloseVertices
)
{
MeshTablesSurface
<
PFP
>
mts
(
map
);
if
(
!
mts
.
importVoxellisation
(
voxellisation
,
attrNames
))
return
false
;
if
(
mergeCloseVertices
)
mts
.
mergeCloseVertices
();
return
importMesh
<
PFP
>
(
map
,
mts
);
}
template
<
typename
PFP
>
bool
importMeshSAsV
(
typename
PFP
::
MAP
&
map
,
MeshTablesSurface
<
PFP
>&
mts
)
...
...
include/Algo/Selection/raySelectFunctor.hpp
View file @
54850cac
...
...
@@ -224,21 +224,6 @@ public:
template
<
typename
PFP
>
bool
distndartOrdering
(
const
std
::
pair
<
typename
PFP
::
REAL
,
Dart
>&
e1
,
const
std
::
pair
<
typename
PFP
::
REAL
,
Dart
>&
e2
)
{
return
(
e1
.
first
<
e2
.
first
);
}
template
<
typename
PFP
>
bool
distnintOrdering
(
const
std
::
pair
<
typename
PFP
::
REAL
,
unsigned
int
>&
e1
,
const
std
::
pair
<
typename
PFP
::
REAL
,
unsigned
int
>&
e2
)
{
return
(
e1
.
first
<
e2
.
first
);
}
namespace
Parallel
{
...
...
include/Algo/Selection/raySelector.h
View file @
54850cac
...
...
@@ -41,17 +41,53 @@ namespace Selection
/**
* Function that does the selection of faces, returned darts are sorted from closest to farthest
* @param map the map we want to test
* @param position the vertex attribute storing positions
* @param rayA first point of ray (user side)
* @param rayAB direction of ray (directed to the scene)
* @param vecFaces (out) vector to store the darts of intersected faces
* @param iPoints (out) vector to store the intersection points
*/
template
<
typename
PFP
>
void
facesRaySelection
(
typename
PFP
::
MAP
&
map
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
position
,
const
typename
PFP
::
VEC3
&
rayA
,
const
typename
PFP
::
VEC3
&
rayAB
,
std
::
vector
<
Dart
>&
vecFaces
);
void
facesRaySelection
(
typename
PFP
::
MAP
&
map
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
position
,
const
typename
PFP
::
VEC3
&
rayA
,
const
typename
PFP
::
VEC3
&
rayAB
,
std
::
vector
<
Dart
>&
vecFaces
,
std
::
vector
<
typename
PFP
::
VEC3
>&
iPoints
);
/**
* Function that does the selection of faces, returned darts are sorted from closest to farthest
* @param map the map we want to test
* @param position the vertex attribute storing positions
* @param rayA first point of ray (user side)
* @param rayAB direction of ray (directed to the scene)
* @param vecFaces (out) vector to store the darts of intersected faces
*/
template
<
typename
PFP
>
void
facesRaySelection
(
typename
PFP
::
MAP
&
map
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
position
,
const
typename
PFP
::
VEC3
&
rayA
,
const
typename
PFP
::
VEC3
&
rayAB
,
std
::
vector
<
Dart
>&
vecFaces
);
/**
* Function that does the selection of one face
* @param map the map we want to test
* @param position the vertex attribute storing positions
* @param rayA first point of ray (user side)
* @param rayAB vector of ray (directed ot the scene)
* @param face (out) dart of selected vertex (set to NIL if no face selected)
*/
template
<
typename
PFP
>
void
faceRaySelection
(
typename
PFP
::
MAP
&
map
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
position
,
const
typename
PFP
::
VEC3
&
rayA
,
const
typename
PFP
::
VEC3
&
rayAB
,
Dart
&
face
);
/**
* Function that does the selection of edges, returned darts are sorted from closest to farthest
* @param map the map we want to test
* @param position the vertex attribute storing positions
* @param rayA first point of ray (user side)
* @param rayAB vector of ray (directed ot the scene)
* @param vecEdges (out) vector to store dart of intersected edges
...
...
@@ -61,9 +97,22 @@ template<typename PFP>
void
edgesRaySelection
(
typename
PFP
::
MAP
&
map
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
position
,
const
typename
PFP
::
VEC3
&
rayA
,
const
typename
PFP
::
VEC3
&
rayAB
,
std
::
vector
<
Dart
>&
vecEdges
,
float
distMax
);
/**
* Function that does the selection of one vertex
* @param map the map we want to test
* @param position the vertex attribute storing positions
* @param rayA first point of ray (user side)
* @param rayAB vector of ray (directed ot the scene)
* @param edge (out) dart of selected vertex (set to NIL if no edge selected)
*/
template
<
typename
PFP
>
void
edgeRaySelection
(
typename
PFP
::
MAP
&
map
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
position
,
const
typename
PFP
::
VEC3
&
rayA
,
const
typename
PFP
::
VEC3
&
rayAB
,
Dart
&
edge
);
/**
* Function that does the selection of vertices, returned darts are sorted from closest to farthest
* @param map the map we want to test
* @param position the vertex attribute storing positions
* @param rayA first point of ray (user side)
* @param rayAB vector of ray (directed ot the scene)
* @param vecVertices (out) vector to store dart of intersected vertices
...
...
@@ -73,20 +122,10 @@ template<typename PFP>
void
verticesRaySelection
(
typename
PFP
::
MAP
&
map
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
position
,
const
typename
PFP
::
VEC3
&
rayA
,
const
typename
PFP
::
VEC3
&
rayAB
,
std
::
vector
<
Dart
>&
vecVertices
);
/**
* Volume selection, not yet functional
*/
template
<
typename
PFP
>
void
volumesRaySelection
(
typename
PFP
::
MAP
&
map
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
position
,
const
typename
PFP
::
VEC3
&
rayA
,
const
typename
PFP
::
VEC3
&
rayAB
,
std
::
vector
<
Dart
>&
vecVolumes
);
/**
* Function that does the selection of one vertex
* @param map the map we want to test
* @param position the vertex attribute storing positions
* @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 NIL if no vertex selected)
...
...
@@ -95,6 +134,14 @@ template<typename PFP>
void
vertexRaySelection
(
typename
PFP
::
MAP
&
map
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
position
,
const
typename
PFP
::
VEC3
&
rayA
,
const
typename
PFP
::
VEC3
&
rayAB
,
Dart
&
vertex
);
/**
* Volume selection, not yet functional
*/
template
<
typename
PFP
>
void
volumesRaySelection
(
typename
PFP
::
MAP
&
map
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
position
,
const
typename
PFP
::
VEC3
&
rayA
,
const
typename
PFP
::
VEC3
&
rayAB
,
std
::
vector
<
Dart
>&
vecVolumes
);
template
<
typename
PFP
>
void
facesPlanSelection
(
typename
PFP
::
MAP
&
map
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
position
,
...
...
include/Algo/Selection/raySelector.hpp
View file @
54850cac
This diff is collapsed.
Click to expand it.
include/Topology/generic/cellmarker.h
View file @
54850cac
...
...
@@ -198,6 +198,8 @@ public:
assert
(
m_map
.
getMarkerSet
<
CELL
>
(
m_thread
).
testMark
(
m_mark
));
assert
(
m_markVector
!=
NULL
);
if
(
em
==
EMBNULL
)
return
false
;
return
m_markVector
->
operator
[](
em
).
testMark
(
m_mark
)
;
}
...
...
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