Class ObjectGalaxySimulator
java.lang.Object
org.episteme.natural.ui.viewers.physics.astronomy.ObjectGalaxySimulator
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublegetG2X()doublegetG2Y()getName()voidinit(List<StarParticle> stars) Initialize the simulator with the star field.voidsetGalaxy2State(double x, double y, double vx, double vy) Updates the state of the second galaxy core.voidupdate(boolean collisionMode, double extG2x, double extG2y) Update the simulation by one step.
-
Constructor Details
-
ObjectGalaxySimulator
public ObjectGalaxySimulator()
-
-
Method Details
-
init
Description copied from interface:GalaxySimulatorInitialize the simulator with the star field.- Specified by:
initin interfaceGalaxySimulator
-
setGalaxy2State
public void setGalaxy2State(double x, double y, double vx, double vy) Description copied from interface:GalaxySimulatorUpdates the state of the second galaxy core.- Specified by:
setGalaxy2Statein interfaceGalaxySimulator
-
update
public void update(boolean collisionMode, double extG2x, double extG2y) Description copied from interface:GalaxySimulatorUpdate the simulation by one step.- Specified by:
updatein interfaceGalaxySimulator
-
getG2X
public double getG2X() -
getG2Y
public double getG2Y() -
getName
- Specified by:
getNamein interfaceGalaxySimulator
-