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
4ba0eaf2
Commit
4ba0eaf2
authored
Dec 01, 2008
by
Oliver Bock
Browse files
Improved accuracy
parent
032592bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/pulsaranimationwidget.cpp
View file @
4ba0eaf2
...
...
@@ -255,7 +255,7 @@ void PulsarAnimationWidget::updateCameraPosition(const int angleH, const int ang
m_cameraPosX
=
sin
(
angleH
*
deg2rad
)
*
zoom
;
m_cameraPosY
=
sin
(
angleV
*
deg2rad
)
*
zoom
;
m_cameraPosZ
=
cos
(
angleH
*
deg2rad
)
*
cos
(
abs
(
angleV
*
deg2rad
))
*
zoom
;
m_cameraPosZ
=
cos
(
angleH
*
deg2rad
)
*
cos
(
f
abs
(
angleV
*
deg2rad
))
*
zoom
;
updateGL
();
}
...
...
@@ -267,7 +267,7 @@ void PulsarAnimationWidget::setFramePerSecond(const unsigned int fps)
void
PulsarAnimationWidget
::
setPulsarSpinFrequency
(
const
float
frequency
)
{
m_pulsarSpinFrequency
=
(
unsigned
int
)
(
1000
/
(
frequency
*
360.0
f
));
m_pulsarSpinFrequency
=
(
unsigned
int
)
(
1000
/
(
frequency
*
360.0
f
)
+
0.5
f
);
m_pulsarSpinTimer
.
setInterval
(
m_pulsarSpinFrequency
);
}
...
...
@@ -279,6 +279,6 @@ void PulsarAnimationWidget::setOrbitRadius(const float radius)
void
PulsarAnimationWidget
::
setOrbitFrequency
(
const
float
frequency
)
{
m_orbitFrequency
=
(
unsigned
int
)
(
1000
/
(
frequency
*
360.0
f
));
m_orbitFrequency
=
(
unsigned
int
)
(
1000
/
(
frequency
*
360.0
f
)
+
0.5
f
);
m_orbitTimer
.
setInterval
(
m_orbitFrequency
);
}
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