Physics-Simulator  v1.4.0-beta.2
main.cpp File Reference

Holds all the main functions. More...

#include "version.h"
#include "core.h"
Include dependency graph for main.cpp:

Namespaces

 global
 
 global::physics
 
 global::equations
 

Macros

#define DEFINED_USE_R2_VEL_MODDER   0
 
#define DEFINED_COLLISION_NORMAL_FORCE   0
 

Functions

int main (int argc, char *argv[])
 

Detailed Description

Holds all the main functions.

Author
GamerMan7799
xPUREx
Version
1.4.0-R
Date
2018

Macro Definition Documentation

◆ DEFINED_COLLISION_NORMAL_FORCE

#define DEFINED_COLLISION_NORMAL_FORCE   0

If this is defined, then program will use apply a normal force to any colliding balls. The forces are along the same direction as the velocities are. It doesn't make sense in the real world.

◆ DEFINED_USE_R2_VEL_MODDER

#define DEFINED_USE_R2_VEL_MODDER   0
Bug:
(GamerMan7799#1#): The balls will become stuck together because not enough time passes between updates, causing the balls to "collide" again, and each time losing more energy.
Todo:
(GamerMan7799#8#): Allow setting of some Physics Values in Config
Todo:
(GamerMan7799#8#): Set Max/Min values for mass?

If this is defined, then program will use unrealistic method that will increase the velocity of two colliding balls the closer they are together it will reduce the number of times that the balls stick together, but also causes them to get unrealistically high velocities.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

The main function

Parameters
argc= Something required by SDL
argv= Something required by SDL
Returns
0 for successfully ran, or 1 for an error happened.
Here is the call graph for this function: