Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.

Commit daf184f

Browse files
a104437anavoidbert
andauthored
Start final solar system (#79)
* Start final solar system * Fix format * Saturn ring * Fix * Fix * Add light * Support both textures and materials in shader * Move textures to correct directory * Solar System cleanup and sun brightness Use names for objects, as requested before, to make object picking simpler later * Regenerate Solar System scene * Remove help comment * Add comets textures * Fix * Fix --------- Co-authored-by: voidbert <humbertogilgomes@protonmail.com>
1 parent 60cd26c commit daf184f

33 files changed

Lines changed: 23076 additions & 10376 deletions

include/engine/render/ShadedShaderProgram.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class ShadedShaderProgram : public ShaderProgram {
5050
void setNormalMatrix(const glm::mat4 &normalMatrix) const;
5151
void setCameraPosition(const glm::vec3 &position) const;
5252

53-
void setTexture(const Texture &texture) const;
53+
void setTexture(const Texture &texture, const scene::Material &material) const;
5454
void setMaterial(const scene::Material &material) const;
5555
void setLights(const std::vector<std::unique_ptr<scene::light::Light>> &lights) const;
5656

include/generator/SolarSystem.hpp

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,26 @@ class SolarSystem {
4040

4141
private:
4242
tinyxml2::XMLElement *createVector(const std::string &name, const glm::vec3 &vec);
43-
tinyxml2::XMLElement *createBody(float radius,
43+
tinyxml2::XMLElement *createColor(const std::string &name, const glm::vec3 &color);
44+
45+
tinyxml2::XMLElement *createBody(const std::string &name,
46+
float radius,
4447
float distance,
4548
float orbitTime,
4649
float rotationTime,
4750
float y = 0.0f,
4851
bool hasOrbiters = false);
49-
tinyxml2::XMLElement *createRings(float radius);
50-
tinyxml2::XMLElement *
51-
createAsteroidBelt(float minDistance, float maxDistance, float orbitTime, int numAsteroids);
52-
tinyxml2::XMLElement *createComet();
52+
tinyxml2::XMLElement *createRings(const std::string &name, float radius);
53+
tinyxml2::XMLElement *createAsteroidBelt(const std::string &name,
54+
float minDistance,
55+
float maxDistance,
56+
float orbitTime,
57+
int numAsteroids);
58+
tinyxml2::XMLElement *createComet(const std::string &name);
5359

5460
void createPreamble(float sunScale, float rockyScale, float gasScale);
5561
void createCamera();
62+
void createLight();
5663
void createObjects(float sunScale, float rockyScale, float gasScale);
5764
};
5865

res/scenes/solarSystem/Comet.jpg

319 KB
Loading

res/scenes/solarSystem/Earth.jpg

336 KB
Loading

res/scenes/solarSystem/Jupiter.jpg

154 KB
Loading

res/scenes/solarSystem/Mars.jpg

227 KB
Loading

res/scenes/solarSystem/Mercury.jpg

279 KB
Loading

res/scenes/solarSystem/Moon.jpg

394 KB
Loading

res/scenes/solarSystem/Neptune.jpg

46.9 KB
Loading

res/scenes/solarSystem/Rings.jpg

228 KB
Loading

0 commit comments

Comments
 (0)