Class Particle
java.lang.Object
org.episteme.natural.physics.classical.mechanics.Particle
- All Implemented Interfaces:
SpatialOctree.SpatialObject
- Direct Known Subclasses:
Atom, CelestialBody
A particle in N-body simulation using Generic Linear Algebra.
Modernized to use Real for all physical properties.
Implements SpatialOctree.SpatialObject for high-performance
Barnes-Hut simulations.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondistanceTo(Particle other) getMass()doubledoublegetX()doublegetY()doublegetZ()Calculates kinetic energy.voidsetAcceleration(double x, double y, double z) voidsetAcceleration(Vector<Real> acceleration) voidsetAcceleration(Real x, Real y, Real z) voidsetPosition(Vector<Real> position) voidsetPosition(Real x, Real y, Real z) voidsetVelocity(double x, double y, double z) voidsetVelocity(Vector<Real> velocity) voidsetVelocity(Real x, Real y, Real z) toString()voidupdatePosition(Real dt) voidupdateVelocity(Real dt)
-
Constructor Details
-
Particle
public Particle(double x, double y, double z, double massKg) -
Particle
-
Particle
-
-
Method Details
-
getPosition
-
getVelocity
-
getAcceleration
-
getMass
-
setPosition
-
setVelocity
-
setAcceleration
-
getX
public double getX()- Specified by:
getXin interfaceSpatialOctree.SpatialObject
-
getY
public double getY()- Specified by:
getYin interfaceSpatialOctree.SpatialObject
-
getZ
public double getZ()- Specified by:
getZin interfaceSpatialOctree.SpatialObject
-
getMassValue
public double getMassValue()- Specified by:
getMassValuein interfaceSpatialOctree.SpatialObject
-
setPosition
-
distanceTo
-
updatePosition
-
updateVelocity
-
kineticEnergy
-
setVelocity
-
setAcceleration
-
setVelocity
public void setVelocity(double x, double y, double z) -
setAcceleration
public void setAcceleration(double x, double y, double z) -
toString
-