Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
isc_physics
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
Show more breadcrumbs
orestis.malaspin
isc_physics
Commits
9fe9b66c
Commit
9fe9b66c
authored
1 year ago
by
Arian Ubuntu
Browse files
Options
Downloads
Patches
Plain Diff
Renommer type "planet_t" par "celestial_body_t"
parent
eb445369
No related branches found
Branches containing commit
No related tags found
1 merge request
!42
Renommer type "planet_t" par "celestial_body_t"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
practical_work/planets/skeleton/planet/planet.h
+5
-5
5 additions, 5 deletions
practical_work/planets/skeleton/planet/planet.h
with
5 additions
and
5 deletions
practical_work/planets/skeleton/planet/planet.h
+
5
−
5
View file @
9fe9b66c
...
...
@@ -4,23 +4,23 @@
#include
"../vec2/vec2.h"
#include
"../gfx/gfx.h"
typedef
struct
_
planet
typedef
struct
_
celestial_body
{
double
mass
;
vec2
pos
;
// x(t)
vec2
prec_pos
;
// x(t - dt)
}
planet
_t
;
}
celestial_body
_t
;
typedef
struct
_system
{
planet
_t
star
;
// ex. The sun
celestial_body
_t
star
;
// ex. The sun
uint32_t
nb_planets
;
// The number of orbiting planets
planet
_t
*
planets
;
// An array of orbiting planets
celestial_body
_t
*
planets
;
// An array of orbiting planets
}
system_t
;
// Those function are not mandatory to implement,
// it's rather a hint of what you should have.
planet
_t
create_planet
(
double
mass
,
vec2
pos
);
celestial_body
_t
create_planet
(
double
mass
,
vec2
pos
);
system_t
create_system
(
double
delta_t
);
void
show_system
(
struct
gfx_context_t
*
ctxt
,
system_t
*
system
);
void
update_system
(
system_t
*
system
,
double
delta_t
);
...
...
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