Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
glow-extras
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-extras
Commits
d67fd4bf
Commit
d67fd4bf
authored
5 years ago
by
Julius Nehring-Wirxel
Browse files
Options
Downloads
Patches
Plain Diff
Moved hacks to experimental header and namespace.
parent
95548646
No related branches found
No related tags found
1 merge request
!80
Added getter for mouse-pos and windows size for interactive mode.
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
viewer/glow-extras/viewer/experimental.hh
+19
-0
19 additions, 0 deletions
viewer/glow-extras/viewer/experimental.hh
viewer/glow-extras/viewer/view.hh
+1
-12
1 addition, 12 deletions
viewer/glow-extras/viewer/view.hh
with
20 additions
and
12 deletions
viewer/glow-extras/viewer/experimental.hh
0 → 100644
+
19
−
0
View file @
d67fd4bf
#pragma once
#include
<glow-extras/viewer/view.hh>
namespace
glow
::
viewer
::
experimental
{
/// Query the 3D position at the given pixel, only usable in interactive viewers
inline
tg
::
optional
<
tg
::
pos3
>
interactive_get_position
(
int
x
,
int
y
)
{
return
detail
::
query_current_viewer_3d_position
(
x
,
y
);
}
/// Query the 3D position at the given pixel, only usable in interactive viewers
inline
tg
::
optional
<
tg
::
pos3
>
interactive_get_position
(
tg
::
pos2
const
pos
)
{
return
interactive_get_position
(
pos
.
x
,
pos
.
y
);
}
/// Get the window size, only usable in interactive viewers
inline
tg
::
isize2
interactive_get_window_size
()
{
return
detail
::
query_current_viewer_window_size
();
}
/// Get the last valid mouse postition, only usable in interactive viewers.
inline
tg
::
pos2
interactive_get_mouse_position
()
{
return
detail
::
query_mouse_position
();
}
}
This diff is collapsed.
Click to expand it.
viewer/glow-extras/viewer/view.hh
+
1
−
12
View file @
d67fd4bf
...
@@ -303,24 +303,13 @@ detail::raii_view_closer view_cleared(Args&&... args)
...
@@ -303,24 +303,13 @@ detail::raii_view_closer view_cleared(Args&&... args)
// Only functional inside ::interactive
// Only functional inside ::interactive
inline
void
view_clear_accumulation
()
{
detail
::
submit_command
(
detail
::
command
::
sceneClearAccum
());
}
inline
void
view_clear_accumulation
()
{
detail
::
submit_command
(
detail
::
command
::
sceneClearAccum
());
}
/// Query the 3D position at the given pixel, only usable in interactive viewers
inline
tg
::
optional
<
tg
::
pos3
>
interactive_get_position
(
int
x
,
int
y
)
{
return
detail
::
query_current_viewer_3d_position
(
x
,
y
);
}
/// Query the 3D position at the given pixel, only usable in interactive viewers
inline
tg
::
optional
<
tg
::
pos3
>
interactive_get_position
(
tg
::
pos2
const
pos
)
{
return
interactive_get_position
(
pos
.
x
,
pos
.
y
);
}
/// Get the window size, only usable in interactive viewers
inline
tg
::
isize2
interactive_get_window_size
()
{
return
detail
::
query_current_viewer_window_size
();
}
/// Get the last valid mouse postition, only usable in interactive viewers.
inline
tg
::
pos2
interactive_get_mouse_position
()
{
return
detail
::
query_mouse_position
();
}
/// Makes a screenshot of the current scene, only usable in interactive viewers
/// Makes a screenshot of the current scene, only usable in interactive viewers
inline
void
make_screenshot
(
std
::
string
const
&
filename
,
int
w
=
-
1
,
int
h
=
-
1
,
int
accumulationCount
=
128
)
inline
void
make_screenshot
(
std
::
string
const
&
filename
,
int
w
=
-
1
,
int
h
=
-
1
,
int
accumulationCount
=
128
)
{
{
detail
::
make_screenshot
(
filename
,
w
,
h
,
accumulationCount
);
detail
::
make_screenshot
(
filename
,
w
,
h
,
accumulationCount
);
}
}
namespace
detail
namespace
detail
{
{
/// Internal use only, returns all currently registered fonts, {name, path}
/// Internal use only, returns all currently registered fonts, {name, path}
...
...
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