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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Overkill Studios
imt2531-assignment2
Commits
0252adf8
Commit
0252adf8
authored
6 years ago
by
Halvor Smedås
Browse files
Options
Downloads
Patches
Plain Diff
Added way of moving lights around
parent
d5a7fffb
Branches
feature/loadlights
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
assets/scenes/_default.yml
+40
-6
40 additions, 6 deletions
assets/scenes/_default.yml
src/EntityPointLight.cpp
+1
-1
1 addition, 1 deletion
src/EntityPointLight.cpp
with
41 additions
and
7 deletions
assets/scenes/_default.yml
+
40
−
6
View file @
0252adf8
...
...
@@ -11,7 +11,7 @@ camera: maincam
nearClip
:
0.1
farClip
:
4000
entities
:
3
entities
:
5
entity
:
skybox
...
...
@@ -32,28 +32,62 @@ entity: Suzanne
entity
:
cube
model
:
cub
e
model
:
Icospher
e
position
:
10 0
0
rotation
:
0 0
0
scale
:
1 1
1
velocity
:
0 0
0
angleVelocity
:
0 0
0
pointlights
:
1
entity
:
light0
model
:
null
position
:
10 0
0
rotation
:
0 0
0
scale
:
1 1
1
velocity
:
0 0
0
angleVelocity
:
0 0
0
entity
:
light1
model
:
null
position
:
-10 0
0
rotation
:
0 0
0
scale
:
1 1
1
velocity
:
0 0
0
angleVelocity
:
0 0
0
pointlights
:
3
pointlight
:
red
position
:
0 0
0
position
:
0 0
0
#use parent position instead
velocity
:
0 0
0
intensities
:
2 0
0
falloff
:
1.0 0.03125
0.0625
pointlight
:
green
position
:
10 0
0
#use parent position instead
velocity
:
0 0
0
intensities
:
0 2
0
falloff
:
1.0 0.03125
0.0625
pointlight
:
blue
position
:
-10 0
0
#use parent position instead
velocity
:
0 0
0
intensities
:
1
0 0
0
intensities
:
0 0
2
falloff
:
1.0 0.03125
0.0625
hasSun
:
0
relations
:
3
relations
:
7
red
:
0
green
:
0
blue
:
0
cube
:
1
red
Suzanne
:
1
cube
light0
:
1
green
light1
:
1
blue
This diff is collapsed.
Click to expand it.
src/EntityPointLight.cpp
+
1
−
1
View file @
0252adf8
...
...
@@ -36,7 +36,7 @@ void EntityPointLight::update(float dt, glm::mat4 parentMatrix)
m_transformMatrix
=
getModelMatrix
(
parentMatrix
);
m_position
+=
m_velocity
*
dt
;
m_rotation
+=
m_angularVelocity
*
dt
;
m_position
=
glm
::
vec3
(
parentMatrix
[
3
]);
...
...
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