Space Comps
 All Classes Files Functions Variables
orbitalphysics.h
1 #ifndef ORBITALPHYSICS_H
2 #define ORBITALPHYSICS_H
3 #include "physics.h"
4 
13 class OrbitalPhysics : public Physics
14 {
15 public:
27  OrbitalPhysics(double xWinSize, double yWinSize, double zWinSize, double massIn);
28  ~OrbitalPhysics();
29 
41  double calculatePE(Particle* p);
42 
43 private:
44  double xWinSize;
45  double yWinSize;
46  double zWinSize;
47  double centerMass;
48 // Particle* centerOfGravity;
49 
50  void updatePositionAndVelocity(Particle* p, int timestep);
51  std::valarray<double> calculateGravityAcceleration(Particle* p);
52  void initializeAcceleration(Particle* p);
53 };
54 
55 #endif // ORBITALPHYSICS_H
The OrbitalPhysics class is a Physics for three dimensional motion with gravity.
Definition: orbitalphysics.h:13
OrbitalPhysics(double xWinSize, double yWinSize, double zWinSize, double massIn)
Constructs a Physics3D object with gravity.
Definition: orbitalphysics.cpp:4
The Physics class.
Definition: physics.h:15
double calculatePE(Particle *p)
Calculates the potential energy of the given Particle.
Definition: orbitalphysics.cpp:55
Definition: particle.h:12