initial commit
Started the gVector (game vector) class. The constructors have been
made, and tested in main.
Heidi added the accessors and mutators for the gVector class member
variables.
Added vector operation functions.
Added setLocation(int,int), normalizeVector(), and move() to the gVector
class. I've modified main to use an array of gVectors. Each element in
the array has random values assigned to it's member varialbes. I have
each object in the array move according to it's speed and x, y vector
components.
Added random and group influences to individual object movement.
Added globals for number of objects, and the objects speed. I've added a
few functions to the gVector class so that the code in main will be
cleaner (print()), and I've added some functions in Vector-test.cpp. The
goal of that is to make main as small and readable as possible. The new
functions will be used to find vectors that can be used to influence
other object vectors in the space.
Added new add and subtract funtions.
Set it so that the objects can have negative and positive motion vectors
when initialized. Changed output information in main. Added
descriptions/psuedo-code of object movement influences.
Added a Globals namespace. The screen height and width are declared
inside of the namespace, and are used in gVector to tell the objects the
boundries that they must respect when moving. I completed two TODOs in
the gVector.cpp file.
Added a function that will help each object avoid colliding with another
object.
Removed unnecessary macros.
Added two distance functions.
Added the objectAvoidance function's return vector to the influences of
the objects in main.
Moved globals out of Vector-test.cpp and placed them into Globals.hpp.
Removed a TODO from gVector.cpp.
I now have graphics that are displaying the motion of the objects. I've
done a real hack job at getting the graphics to display. I took a lazy
foo tutorial and just place my code around what was done to display a
single dot. Now we can see multiple dots moving across the screen. The
four functions that are used to influece the objects appear to be
working, but they can be tweaked, and so can the percentage of how they
influence the objects.
Move FRAMES_PER_SECOND to Globals.hpp.
Some idiot is bad at math and had a distance formula that was not
correct. It has been fixed.
Added time.h so that I could seed rand(). Changed centerGroupLocation to
take an int for the current index. Changed the object generating code to
randomly place the location of the objects within the bounds of the
screen width and height, and not 100 by 100.
Added a global variable for view area of objects.