Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
imt2531-assignment2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Overkill Studios
imt2531-assignment2
Commits
df122221
Commit
df122221
authored
7 years ago
by
JonShard
Browse files
Options
Downloads
Patches
Plain Diff
Romved aspect ratio as an attribute loaded from the scene.
parent
14435f1c
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
assets/scenes/_default.yml
+4
-5
4 additions, 5 deletions
assets/scenes/_default.yml
assets/scenes/demo1.yml
+0
-5
0 additions, 5 deletions
assets/scenes/demo1.yml
assets/scenes/skybox.yml
+0
-1
0 additions, 1 deletion
assets/scenes/skybox.yml
src/Scene.cpp
+1
-13
1 addition, 13 deletions
src/Scene.cpp
with
5 additions
and
24 deletions
assets/scenes/_default.yml
+
4
−
5
View file @
df122221
...
@@ -7,7 +7,6 @@ camera: maincam
...
@@ -7,7 +7,6 @@ camera: maincam
angleVelocity
:
0 0
0
angleVelocity
:
0 0
0
mode
:
orbital
mode
:
orbital
fov
:
90
fov
:
90
aspectRatio
:
1.25
nearClip
:
0.1
nearClip
:
0.1
farClip
:
4000
farClip
:
4000
...
...
This diff is collapsed.
Click to expand it.
assets/scenes/demo1.yml
+
0
−
5
View file @
df122221
...
@@ -7,7 +7,6 @@ camera: mainCam
...
@@ -7,7 +7,6 @@ camera: mainCam
angleVelocity
:
0 0
0
angleVelocity
:
0 0
0
mode
:
orbital
mode
:
orbital
fov
:
90
fov
:
90
aspectRatio
:
1.25
nearClip
:
0.1
nearClip
:
0.1
farClip
:
800
farClip
:
800
...
@@ -18,7 +17,6 @@ camera: mainCam
...
@@ -18,7 +17,6 @@ camera: mainCam
angleVelocity
:
0 0
0
angleVelocity
:
0 0
0
mode
:
orbital
mode
:
orbital
fov
:
90
fov
:
90
aspectRatio
:
1.25
nearClip
:
0.1
nearClip
:
0.1
farClip
:
800
farClip
:
800
...
@@ -29,7 +27,6 @@ camera: mainCam
...
@@ -29,7 +27,6 @@ camera: mainCam
angleVelocity
:
0 0
0
angleVelocity
:
0 0
0
mode
:
freelook
mode
:
freelook
fov
:
90
fov
:
90
aspectRatio
:
1.25
nearClip
:
0.1
nearClip
:
0.1
farClip
:
800
farClip
:
800
...
@@ -40,7 +37,6 @@ camera: mainCam
...
@@ -40,7 +37,6 @@ camera: mainCam
angleVelocity
:
0 0
0
angleVelocity
:
0 0
0
mode
:
freelook
mode
:
freelook
fov
:
90
fov
:
90
aspectRatio
:
1.25
nearClip
:
0.1
nearClip
:
0.1
farClip
:
800
farClip
:
800
...
@@ -51,7 +47,6 @@ camera: mainCam
...
@@ -51,7 +47,6 @@ camera: mainCam
angleVelocity
:
0 0
0
angleVelocity
:
0 0
0
mode
:
orbital
mode
:
orbital
fov
:
90
fov
:
90
aspectRatio
:
1.25
nearClip
:
0.1
nearClip
:
0.1
farClip
:
1000
farClip
:
1000
...
...
This diff is collapsed.
Click to expand it.
assets/scenes/skybox.yml
+
0
−
1
View file @
df122221
...
@@ -7,7 +7,6 @@ camera: maincam
...
@@ -7,7 +7,6 @@ camera: maincam
angleVelocity
:
0 0
0
angleVelocity
:
0 0
0
mode
:
freelook
mode
:
freelook
fov
:
90
fov
:
90
aspectRatio
:
1.25
nearClip
:
0.1
nearClip
:
0.1
farClip
:
-100
farClip
:
-100
...
...
This diff is collapsed.
Click to expand it.
src/Scene.cpp
+
1
−
13
View file @
df122221
...
@@ -65,7 +65,6 @@ int Scene::m_lightsCount;
...
@@ -65,7 +65,6 @@ int Scene::m_lightsCount;
glm
::
vec3
angVel
;
glm
::
vec3
angVel
;
CameraMode
camMode
=
FREELOOK
;
CameraMode
camMode
=
FREELOOK
;
float
camFov
=
0
;
float
camFov
=
0
;
float
aspect
=
0
;
float
nearClip
=
0
;
float
nearClip
=
0
;
float
farClip
=
0
;
float
farClip
=
0
;
...
@@ -157,17 +156,6 @@ int Scene::m_lightsCount;
...
@@ -157,17 +156,6 @@ int Scene::m_lightsCount;
LOG_INFO
(
"%s: %f"
,
key
.
data
(),
camFov
);
LOG_INFO
(
"%s: %f"
,
key
.
data
(),
camFov
);
}
}
// float aspectRatio.
if
(
auto
[
key
,
aspectRatio
,
err
]
=
p
.
keyFloat
(
"aspectRatio"
);
err
)
{
LOG_ERROR
(
"%s error on camera aspect ratio key --> %s..."
,
filestring
.
c_str
(),
key
.
data
());
}
else
{
aspect
=
aspectRatio
;
LOG_INFO
(
"%s: %f"
,
key
.
data
(),
aspect
);
}
// float nearClip.
// float nearClip.
if
(
auto
[
key
,
_nearClip
,
err
]
=
p
.
keyFloat
(
"nearClip"
);
err
)
if
(
auto
[
key
,
_nearClip
,
err
]
=
p
.
keyFloat
(
"nearClip"
);
err
)
{
{
...
@@ -198,7 +186,7 @@ int Scene::m_lightsCount;
...
@@ -198,7 +186,7 @@ int Scene::m_lightsCount;
angVel
,
angVel
,
camMode
,
camMode
,
camFov
,
camFov
,
a
spect
,
C
::
A
spect
Ratio
,
nearClip
,
nearClip
,
farClip
);
farClip
);
Scene
::
addEntity
(
camEntity
);
Scene
::
addEntity
(
camEntity
);
...
...
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