-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
40 lines (37 loc) · 943 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/**\brief Electric Field Simulator Entry Point
* \author Henry J Schmale
* \date March 11, 2015
* \file main.cpp
*
* USAGE:
* argv[0] <s|e> [file]
*
* s - simulate, the simulation parameters must be specified in
* file must be specified
* e - output an example file, if file is specified then it is written
* out to stdout
*
*/
#include <iostream>
#include <string>
#include <cstdio>
#include "config.h"
#include "physics.h"
#include "graphics.h"
//using namespace LibBoard;
/**\brief This is the program entry point, stupid
* \param argc The number of args passed in argv
* \param argv The arguement array
*/
int main(int argc, char **argv){
int argret = parseArgs(argc, argv);
if(argret == ARG_FAILED){
return 0;
}
initDrawing();
calcElectroForceVecs();
drawVectors();
drawChargeSrcs();
doneDraw(std::string(std::string(argv[2]) + ".svg").c_str());
shutdown();
}