Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
glow-samples
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
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Glow
glow-samples
Commits
7886eff7
Commit
7886eff7
authored
3 years ago
by
Aaron Kreuzberg
Browse files
Options
Downloads
Patches
Plain Diff
Picking Visualization fix (still buggy)
parent
7458cffc
Branches
Branches containing commit
No related tags found
1 merge request
!16
picking samples
Pipeline
#18023
passed
3 years ago
Stage: Build
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
extern/glow-extras
+1
-1
1 addition, 1 deletion
extern/glow-extras
samples/basic/viewer/main.cc
+16
-4
16 additions, 4 deletions
samples/basic/viewer/main.cc
with
17 additions
and
5 deletions
glow-extras
@
e904896a
Subproject commit
a6d17933b2b8093098386f07596c3a8cc079c406
Subproject commit
e904896aaca745dbedc2b9d2baa19eee971f6fcb
This diff is collapsed.
Click to expand it.
samples/basic/viewer/main.cc
+
16
−
4
View file @
7886eff7
...
@@ -116,6 +116,7 @@ void simple_picking(pm::vertex_attribute<tg::pos3> const& pos, pm::face_attribut
...
@@ -116,6 +116,7 @@ void simple_picking(pm::vertex_attribute<tg::pos3> const& pos, pm::face_attribut
gv
::
view
(
pos
,
col
,
gv
::
pick
().
on_left_click
([
&
](
uint32_t
face_id
,
tg
::
pos3
world_pos
,
tg
::
vec3
normal
)
{
gv
::
view
(
pos
,
col
,
gv
::
pick
().
on_left_click
([
&
](
uint32_t
face_id
,
tg
::
pos3
world_pos
,
tg
::
vec3
normal
)
{
std
::
cout
<<
"Something has been picked! ON_LEFT_CLICK"
std
::
cout
<<
"Something has been picked! ON_LEFT_CLICK"
<<
"ID: "
<<
face_id
<<
std
::
endl
;
<<
"ID: "
<<
face_id
<<
std
::
endl
;
std
::
cout
<<
"World_Position"
<<
world_pos
<<
std
::
endl
;
return
;
return
;
}));
}));
}
}
...
@@ -138,6 +139,17 @@ void simple_picking(pm::vertex_attribute<tg::pos3> const& pos, pm::face_attribut
...
@@ -138,6 +139,17 @@ void simple_picking(pm::vertex_attribute<tg::pos3> const& pos, pm::face_attribut
}));
}));
}
}
{
//DOES NOT WORK RIGHT NOW - NEEDS TO BE FIXED
// Access of according face_indices while picking. Enable mesh access. WARNING: Does only work when Picking IDs are automatically generated and NOT user-defined
gv
::
view
(
pos
,
col
,
gv
::
pick
().
on_left_click
([
&
](
pm
::
face_index
id
,
tg
::
pos3
world_pos
,
tg
::
vec3
normal
)
{
// std::cout << "Something has been picked! ON_LEFT_CLICK"
// << "Face_index achieved" << id.value << std::endl;
// Mesh access at this point?
Picking_result
r
;
return
r
;
}));
}
{
{
// On_hover, on_right_click, and on_left_click callbacks defined simultaneously
// On_hover, on_right_click, and on_left_click callbacks defined simultaneously
gv
::
view
(
pos
,
col
,
gv
::
view
(
pos
,
col
,
...
...
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