Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
CA-Framework
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Courses
CA-Framework
Commits
05e9f5d8
Commit
05e9f5d8
authored
1 month ago
by
Swampert-zhi
Browse files
Options
Downloads
Patches
Plain Diff
add exercise_0
parent
709773ba
Branches
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
0_dummy/DummySim.cpp
+4
-0
4 additions, 0 deletions
0_dummy/DummySim.cpp
with
4 additions
and
0 deletions
0_dummy/DummySim.cpp
+
4
−
0
View file @
05e9f5d8
...
...
@@ -40,6 +40,7 @@ void DummySim::updateRenderGeometry() {
bool
DummySim
::
advance
()
{
// do next step of some color animation
// update the color
int
speed
=
60
;
int
decColor
=
(
m_step
/
speed
)
%
3
;
int
incColor
=
(
decColor
+
1
)
%
3
;
...
...
@@ -49,6 +50,9 @@ bool DummySim::advance() {
m_C
(
i
,
incColor
)
=
(
m_C
(
i
,
incColor
)
*
speed
+
1
)
/
speed
;
}
// TODO: update m_V (and m_F maybe) here
// advance step
m_step
++
;
return
false
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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