Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
einsteinathome
pulsatingscience
Commits
e0f6c689
Commit
e0f6c689
authored
Feb 05, 2009
by
Oliver Bock
Browse files
Fixed camera positioning (solves amplitude-out-of-range issue)
parent
1a605d11
Changes
1
Show whitespace changes
Inline
Side-by-side
src/pulsaranimationwidget.cpp
View file @
e0f6c689
...
@@ -460,7 +460,7 @@ void PulsarAnimationWidget::mouseReleaseEvent(QMouseEvent *event)
...
@@ -460,7 +460,7 @@ void PulsarAnimationWidget::mouseReleaseEvent(QMouseEvent *event)
void
PulsarAnimationWidget
::
updateCameraPosition
(
const
int
angleH
,
const
int
angleV
,
const
double
zoom
)
void
PulsarAnimationWidget
::
updateCameraPosition
(
const
int
angleH
,
const
int
angleV
,
const
double
zoom
)
{
{
m_cameraPosX
=
sin
(
angleH
*
deg2rad
)
*
zoom
;
m_cameraPosX
=
sin
(
angleH
*
deg2rad
)
*
cos
(
angleV
*
deg2rad
)
*
zoom
;
m_cameraPosY
=
sin
(
angleV
*
deg2rad
)
*
zoom
;
m_cameraPosY
=
sin
(
angleV
*
deg2rad
)
*
zoom
;
m_cameraPosZ
=
cos
(
angleH
*
deg2rad
)
*
cos
(
angleV
*
deg2rad
)
*
zoom
;
m_cameraPosZ
=
cos
(
angleH
*
deg2rad
)
*
cos
(
angleV
*
deg2rad
)
*
zoom
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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