Class ObjectGalaxySimulator

java.lang.Object
org.episteme.natural.ui.viewers.physics.astronomy.ObjectGalaxySimulator
All Implemented Interfaces:
GalaxySimulator

public class ObjectGalaxySimulator extends Object implements GalaxySimulator
Object-based implementation of Galaxy Physics. Uses Vector for all positions and velocities. Demonstrates overhead of object creation/math vs primitive doubles.
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Constructor Details

    • ObjectGalaxySimulator

      public ObjectGalaxySimulator()
  • Method Details

    • init

      public void init(List<StarParticle> stars)
      Description copied from interface: GalaxySimulator
      Initialize the simulator with the star field.
      Specified by:
      init in interface GalaxySimulator
    • setGalaxy2State

      public void setGalaxy2State(double x, double y, double vx, double vy)
      Description copied from interface: GalaxySimulator
      Updates the state of the second galaxy core.
      Specified by:
      setGalaxy2State in interface GalaxySimulator
    • update

      public void update(boolean collisionMode, double extG2x, double extG2y)
      Description copied from interface: GalaxySimulator
      Update the simulation by one step.
      Specified by:
      update in interface GalaxySimulator
    • getG2X

      public double getG2X()
    • getG2Y

      public double getG2Y()
    • getName

      public String getName()
      Specified by:
      getName in interface GalaxySimulator