Go to the
documentation of this file.
00001
00002
00003
00004
00005
00006
00007
00008
00009 #pragma once
00010
00011 #include "..\maxheap.h"
00012 #include "BipExp.h"
00013 #include "Tracks.h"
00014 #include "..\point4.h"
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 class vector: public MaxHeapOperators {
00028 public:
00029 float x;
00030 float y;
00031 float z;
00032 float w;
00033
00034
00035 vector()
00036 : x(0.0f),y(0.0f),z(0.0f),w(1.0f) {}
00037 vector(float X, float Y, float Z)
00038 : x(X), y(Y), z(Z), w(1.0f) {}
00039 vector (float xx, float yy, float zz, float ww)
00040 : x(xx), y(yy), z(zz), w(ww) { }
00041 vector(Point4 p)
00042 : x(p.x), y(p.y), z(p.z), w(p.w) { }
00043
00044
00045 inline vector operator-(const vector&) const;
00046 inline vector operator+(const vector&) const;
00047 };
00048
00049 inline vector vector::operator-(const vector& b) const {
00050 return(vector(x-b.x,y-b.y,z-b.z));
00051 }
00052
00053 inline vector vector::operator+(const vector& b) const {
00054 return(vector(x+b.x,y+b.y,z+b.z));
00055 }
00056
00057 inline vector operator*(float f, const vector& a) {
00058 return(vector(a.x*f, a.y*f, a.z*f, a.w));
00059 }
00060
00061 inline Point4 VtoP4(const vector& v) { return Point4(v.x, v.y, v.z, v.w); }
00062
00063 typedef Point3 vector2D;
00064
00065
00066
00067 class path_property: public MaxHeapOperators
00068 {
00069 public:
00070 float val;
00071 int time;
00072 float distance;
00073 path_property(){
00074 val = 0.0;
00075 time = 0;
00076 distance = 0;
00077 }
00078
00079 };
00080
00081
00082 class path_properties: public MaxHeapOperators
00083 {
00084 public:
00085 float turn_angle;
00086 float line_distance;
00087 float path_distance;
00088 float average_speed;
00089 float speed_change;
00090 vector direction;
00091 path_property min_speed;
00092 path_property max_speed;
00093 path_property stop;
00094 path_properties(){
00095 turn_angle = 0.0;
00096 line_distance = 0.0;
00097 path_distance = 0.0;
00098 average_speed = 0.0;
00099 speed_change = 1.0;
00100 min_speed.val = 1000000.0;
00101 }
00102
00103 path_properties& operator=(const path_properties& T);
00104
00105 };
00106
00107