Space Comps
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
src
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
OrbitalPhysics
The OrbitalPhysics class is a Physics for three dimensional motion with gravity.
Definition:
orbitalphysics.h:13
OrbitalPhysics::OrbitalPhysics
OrbitalPhysics(double xWinSize, double yWinSize, double zWinSize, double massIn)
Constructs a Physics3D object with gravity.
Definition:
orbitalphysics.cpp:4
Physics
The Physics class.
Definition:
physics.h:15
OrbitalPhysics::calculatePE
double calculatePE(Particle *p)
Calculates the potential energy of the given Particle.
Definition:
orbitalphysics.cpp:55
Particle
Definition:
particle.h:12
Generated on Sun Feb 23 2014 12:52:24 for Space Comps by
1.8.6