Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Jupiteapot
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
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
Adam Štěpánek
Jupiteapot
Commits
91b8cede
There was an error fetching the commit references. Please try again later.
Commit
91b8cede
authored
5 years ago
by
Adam Štěpánek
Browse files
Options
Downloads
Patches
Plain Diff
Position Juno
parent
11195a03
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/application.cpp
+16
-0
16 additions, 0 deletions
src/application.cpp
src/application.hpp
+2
-2
2 additions, 2 deletions
src/application.hpp
with
18 additions
and
2 deletions
src/application.cpp
+
16
−
0
View file @
91b8cede
...
...
@@ -40,6 +40,12 @@ Application::Application(size_t initialWidth, size_t initialHeight) {
galileo
.
modelMatrix
()
=
glm
::
rotate
(
galileo
.
modelMatrix
(),
3.14159
f
/
16.0
f
,
glm
::
vec3
(
1.0
,
0.0
,
0.0
));
galileo
.
modelMatrix
()
=
glm
::
rotate
(
galileo
.
modelMatrix
(),
-
3.14159
f
/
16.0
f
,
glm
::
vec3
(
0.0
,
0.0
,
1.0
));
cassini
.
modelMatrix
()
=
glm
::
scale
(
cassini
.
modelMatrix
(),
glm
::
vec3
(
0.2
f
));
juno
.
modelMatrix
()
=
glm
::
scale
(
juno
.
modelMatrix
(),
glm
::
vec3
(
0.1
f
));
juno
.
modelMatrix
()
=
glm
::
rotate
(
juno
.
modelMatrix
(),
-
3.14159
f
/
4.0
f
,
glm
::
vec3
(
0.0
,
1.0
,
0.0
));
juno
.
modelMatrix
()
=
glm
::
rotate
(
juno
.
modelMatrix
(),
3.14159
f
/
2.0
f
,
glm
::
vec3
(
1.0
,
0.0
,
0.0
));
glCreateBuffers
(
1
,
&
cameraBuffer
);
glNamedBufferStorage
(
cameraBuffer
,
sizeof
(
CameraUBO
),
&
cameraUbo
,
GL_DYNAMIC_STORAGE_BIT
);
...
...
@@ -83,6 +89,8 @@ void Application::render() {
voyager
.
update
();
ulysses
.
update
();
galileo
.
update
();
cassini
.
update
();
juno
.
update
();
// Camera
if
(
followedProbe
)
{
...
...
@@ -145,6 +153,8 @@ void Application::render() {
voyager
.
draw
();
ulysses
.
draw
();
galileo
.
draw
();
cassini
.
draw
();
juno
.
draw
();
glUseProgram
(
drawLightsProgram
.
id
());
...
...
@@ -200,5 +210,11 @@ void Application::onKeyPressed(GLFWwindow *window, int key, int scancode, int ac
case
GLFW_KEY_4
:
followedProbe
=
&
galileo
;
break
;
case
GLFW_KEY_5
:
followedProbe
=
&
cassini
;
break
;
case
GLFW_KEY_6
:
followedProbe
=
&
juno
;
break
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/application.hpp
+
2
−
2
View file @
91b8cede
...
...
@@ -68,8 +68,8 @@ private:
Probe
voyager
=
Probe
(
"objects/voyager/voyager.obj"
,
{
20.0
f
,
2.0
f
,
0.0
f
},
-
0.1
f
,
texturedObjectProgram
,
normalMappedObjectProgram
);
Probe
ulysses
=
Probe
(
"objects/ulysses/ulysses.obj"
,
{
20.0
f
,
-
3.0
f
,
20.0
f
},
0.15
f
,
texturedObjectProgram
,
normalMappedObjectProgram
);
Probe
galileo
=
Probe
(
"objects/galileo/galileo.obj"
,
{
8.0
f
,
6.0
f
,
8.0
f
},
-
0.4
f
,
texturedObjectProgram
,
normalMappedObjectProgram
);
//
Probe cassini = Probe("objects/cassini/cassini.obj", {
2
0.0f,
2
.0f, 0.0f }, texturedObjectProgram, normalMappedObjectProgram);
//
Probe juno = Probe("objects/juno/Juno.obj", { 2
0
.0f, 2.0f, 0.0f
}
, texturedObjectProgram, normalMappedObjectProgram);
Probe
cassini
=
Probe
(
"objects/cassini/cassini.obj"
,
{
-
1
0.0
f
,
-
4
.0
f
,
-
1
0.0
f
},
-
0.2
f
,
texturedObjectProgram
,
normalMappedObjectProgram
);
Probe
juno
=
Probe
(
"objects/juno/Juno.obj"
,
{
2
5
.0
f
,
0.5
f
,
2
5
.0
f
}
,
-
0.0
5
f
,
texturedObjectProgram
,
normalMappedObjectProgram
);
Material
jupiterMaterial
;
glm
::
mat4
jupiterModelMatrix
;
...
...
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