diff options
author | Matt Strapp <matt@mattstrapp.net> | 2021-09-27 21:44:53 -0500 |
---|---|---|
committer | Matt Strapp <matt@mattstrapp.net> | 2021-09-27 21:44:53 -0500 |
commit | b38e870d6be22a377bf7b0fb5048801886ebaa77 (patch) | |
tree | 18e021a36e2f939892eb4895269f420274a341df /dev/a2-carsoccer/car.h | |
parent | Pushed feedback file submission-p1 (diff) | |
download | csci4611-0d26133a493712ab5b3fc9ba9f5ca5d8ea39f783.tar csci4611-0d26133a493712ab5b3fc9ba9f5ca5d8ea39f783.tar.gz csci4611-0d26133a493712ab5b3fc9ba9f5ca5d8ea39f783.tar.bz2 csci4611-0d26133a493712ab5b3fc9ba9f5ca5d8ea39f783.tar.lz csci4611-0d26133a493712ab5b3fc9ba9f5ca5d8ea39f783.tar.xz csci4611-0d26133a493712ab5b3fc9ba9f5ca5d8ea39f783.tar.zst csci4611-0d26133a493712ab5b3fc9ba9f5ca5d8ea39f783.zip |
do ws2submission-w2.0
Diffstat (limited to 'dev/a2-carsoccer/car.h')
-rw-r--r-- | dev/a2-carsoccer/car.h | 104 |
1 files changed, 52 insertions, 52 deletions
diff --git a/dev/a2-carsoccer/car.h b/dev/a2-carsoccer/car.h index 6746a56..c5ae5df 100644 --- a/dev/a2-carsoccer/car.h +++ b/dev/a2-carsoccer/car.h @@ -1,52 +1,52 @@ -/** CSci-4611 Assignment 2: Car Soccer - */ - -#ifndef CAR_H_ -#define CAR_H_ - -#include <mingfx.h> -using namespace mingfx; - -/// Small class representing the car. Feel free to add additional member variables and functions if you wish. -class Car { -public: - Car(); - virtual ~Car(); - - // Size is the size of the box drawn to represent the car in the X, Y, and Z dimensions - Vector3 size(); - - // Radius of the bounding sphere used to calculate approximate physics - float collision_radius(); - - // 3D position of the car - Point3 position(); - void set_position(const Point3 &p); - - // The unit vector direction the car is pointing. Since the car drives around on the - // Y=0 plane, this vector will always have a y coordinate = 0 - Vector3 forward(); - void set_forward(const Vector3 &v); - - // The speed of the car can be positive (moving forward) or negative (moving in reverse) - float speed(); - void set_speed(float s); - - // Current 3D velocity, computed as speed_ * forward_ - Vector3 velocity(); - - // Resets the position, speed, and forward direction to the car's starting point - void Reset(); - - // Draws a simple box shape for the car at the proper position and rotated to face forward - void Draw(QuickShapes quickShapes, Matrix4 modelMatrix, Matrix4 viewMatrix, Matrix4 projMatrix); - -private: - Vector3 size_; - float collision_radius_; - Point3 position_; - Vector3 forward_; - float speed_; -}; - -#endif +/** CSci-4611 Assignment 2: Car Soccer
+ */
+
+#ifndef CAR_H_
+#define CAR_H_
+
+#include <mingfx.h>
+using namespace mingfx;
+
+/// Small class representing the car. Feel free to add additional member variables and functions if you wish.
+class Car {
+public:
+ Car();
+ virtual ~Car();
+
+ // Size is the size of the box drawn to represent the car in the X, Y, and Z dimensions
+ Vector3 size();
+
+ // Radius of the bounding sphere used to calculate approximate physics
+ float collision_radius();
+
+ // 3D position of the car
+ Point3 position();
+ void set_position(const Point3 &p);
+
+ // The unit vector direction the car is pointing. Since the car drives around on the
+ // Y=0 plane, this vector will always have a y coordinate = 0
+ Vector3 forward();
+ void set_forward(const Vector3 &v);
+
+ // The speed of the car can be positive (moving forward) or negative (moving in reverse)
+ float speed();
+ void set_speed(float s);
+
+ // Current 3D velocity, computed as speed_ * forward_
+ Vector3 velocity();
+
+ // Resets the position, speed, and forward direction to the car's starting point
+ void Reset();
+
+ // Draws a simple box shape for the car at the proper position and rotated to face forward
+ void Draw(QuickShapes quickShapes, Matrix4 modelMatrix, Matrix4 viewMatrix, Matrix4 projMatrix);
+
+private:
+ Vector3 size_;
+ float collision_radius_;
+ Point3 position_;
+ Vector3 forward_;
+ float speed_;
+};
+
+#endif
|