Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nt1100 analyser
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Pascal Engeler
nt1100 analyser
Commits
a4e29b5c
Commit
a4e29b5c
authored
2 years ago
by
Pascal Engeler
Browse files
Options
Downloads
Patches
Plain Diff
Fixed a bug
parent
1d6ea4e6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/camera_arcball.hpp
+1
-1
1 addition, 1 deletion
include/camera_arcball.hpp
with
1 addition
and
1 deletion
include/camera_arcball.hpp
+
1
−
1
View file @
a4e29b5c
...
@@ -36,7 +36,7 @@ public:
...
@@ -36,7 +36,7 @@ public:
//float s_extent_h = 0.2 * std::tan(3.14159265 * 45 / 180.);
//float s_extent_h = 0.2 * std::tan(3.14159265 * 45 / 180.);
float
s_extent_h
=
0.2
f
*
std
::
tan
(
3.14159265
*
45
/
180.
/
2.
);
float
s_extent_h
=
0.2
f
*
std
::
tan
(
3.14159265
*
45
/
180.
/
2.
);
float
s_extent_w
=
WIDTH
/
static_cast
<
float
>
(
HEIGHT
)
*
s_extent_h
;
float
s_extent_w
=
WIDTH
/
static_cast
<
float
>
(
HEIGHT
)
*
s_extent_h
;
glm
::
vec3
p_mouse
=
p_sCenter
+
(
mx
-
0.5
f
)
*
s_extent_w
*
0.5
f
*
GetRightVector
()
+
(
my
-
0.5
f
)
*
s_extent_h
*
0.5
f
*
curr_up
;
//TODO: Potentially needs (1-my) instead of my
glm
::
vec3
p_mouse
=
p_sCenter
+
(
mx
-
0.5
f
)
*
s_extent_w
*
GetRightVector
()
+
(
my
-
0.5
f
)
*
s_extent_h
*
curr_up
;
//TODO: Potentially needs (1-my) instead of my
glm
::
vec3
r
=
glm
::
normalize
(
p_mouse
-
p_eye
);
glm
::
vec3
r
=
glm
::
normalize
(
p_mouse
-
p_eye
);
if
(
std
::
abs
(
r
.
z
)
>
0.00001
)
{
if
(
std
::
abs
(
r
.
z
)
>
0.00001
)
{
float
t
=
-
p_mouse
.
z
/
r
.
z
;
float
t
=
-
p_mouse
.
z
/
r
.
z
;
...
...
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