fix: copy particle id on construction
This commit is contained in:
parent
56aa50251b
commit
11d5330c73
|
@ -106,12 +106,11 @@ int main()
|
|||
// TODO: add something in a nice eccentric orbit around the moon
|
||||
// make the earth-moon system
|
||||
ParticleMap map;
|
||||
map.setParticle({"moon", 7.3e22});
|
||||
map.setParticle({"earth", 5.9e24});
|
||||
map.setRelationship("moon", "earth", orbit);
|
||||
// TODO: there is a bug where re-ordering the visualizers breaks rendering
|
||||
ParticleVisualizer moonVis(map, "moon", 0.1, litProgram, unlitProgram);
|
||||
map.setParticle({"moon", 7.3e22});
|
||||
map.setRelationship("earth", "moon", orbit);
|
||||
ParticleVisualizer earthVis(map, "earth", 0.2, litProgram, unlitProgram);
|
||||
ParticleVisualizer moonVis(map, "moon", 0.1, litProgram, unlitProgram);
|
||||
OrbitVisualizer orbitVis(orbit, unlitProgram);
|
||||
|
||||
// register input
|
||||
|
|
|
@ -17,7 +17,7 @@ class ParticleVisualizer
|
|||
void updateModelMatrix();
|
||||
|
||||
const ParticleMap& _map;
|
||||
const std::string& _particleId;
|
||||
const std::string _particleId;
|
||||
Icosphere _sphere;
|
||||
Widget _widget;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue