00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00031
00032 #pragma once
00033
00034 #include "../api_core.h"
00035
00036 template<typename Type>
00037 class CL_LineRay2x;
00038
00039 template<typename Type>
00040 class CL_LineRay3x;
00041
00042 template<typename Type>
00043 class CL_Vec2;
00044
00045 template<typename Type>
00046 class CL_Vec3;
00047
00048 class CL_Angle;
00049
00055 template<typename Type>
00056 class CL_LineRay3x
00057 {
00058 public:
00060 CL_Vec3<Type> p;
00061
00062
00063 CL_Vec3<Type> v;
00064
00065 CL_LineRay3x() { }
00066 CL_LineRay3x(const CL_LineRay3x<Type> ©) { p = copy.p; v = copy.v;}
00067 CL_LineRay3x(const CL_Vec3<Type> &point_p, const CL_Vec3<Type> &direction_v) { p = point_p; v = direction_v; }
00068
00071
00072 public:
00073
00077
00078 public:
00079
00081 CL_LineRay3x<Type> &operator = (const CL_LineRay3x<Type>& copy) { p = copy.p; v = copy.v; return *this; }
00082
00084 bool operator == (const CL_LineRay3x<Type>& line) const {return ((p == line.p) && (v == line.v));}
00085
00087 bool operator != (const CL_LineRay3x<Type>& line) const {return ((p != line.p) || (v != line.v));}
00089 };
00090
00096 template<typename Type>
00097 class CL_LineRay2x
00098 {
00099 public:
00101 CL_Vec2<Type> p;
00102
00103
00104 CL_Vec2<Type> v;
00105
00106 CL_LineRay2x() { }
00107 CL_LineRay2x(const CL_LineRay2x<Type> ©) { p = copy.p; v = copy.v;}
00108 CL_LineRay2x(const CL_Vec2<Type> &point_p, const CL_Vec2<Type> &direction_v) { p = point_p; v = direction_v; }
00109
00112
00113 public:
00114
00118
00119 public:
00120
00122 CL_LineRay2x<Type> &operator = (const CL_LineRay2x<Type>& copy) { p = copy.p; v = copy.v; return *this; }
00123
00125 bool operator == (const CL_LineRay2x<Type>& line) const {return ((p == line.p) && (v == line.v));}
00126
00128 bool operator != (const CL_LineRay2x<Type>& line) const {return ((p != line.p) || (v != line.v));}
00130 };
00131
00136 class CL_LineRay2 : public CL_LineRay2x<int>
00137 {
00138 public:
00139 CL_LineRay2() : CL_LineRay2x<int>() {}
00140 CL_LineRay2(const CL_LineRay2x<int> ©) : CL_LineRay2x<int>(copy) {}
00141 CL_LineRay2(const CL_Vec2<int> &point_p, const CL_Vec2<int> &direction_v) : CL_LineRay2x<int>(point_p, direction_v) {}
00142
00143 };
00144
00149 class CL_LineRay2f : public CL_LineRay2x<float>
00150 {
00151 public:
00152 CL_LineRay2f() : CL_LineRay2x<float>() {}
00153 CL_LineRay2f(const CL_LineRay2x<float> ©) : CL_LineRay2x<float>(copy) {}
00154 CL_LineRay2f(const CL_Vec2<float> &point_p, const CL_Vec2<float> &direction_v) : CL_LineRay2x<float>(point_p, direction_v) {}
00155
00156 };
00157
00162 class CL_LineRay2d : public CL_LineRay2x<double>
00163 {
00164 public:
00165 CL_LineRay2d() : CL_LineRay2x<double>() {}
00166 CL_LineRay2d(const CL_LineRay2x<double> ©) : CL_LineRay2x<double>(copy) {}
00167 CL_LineRay2d(const CL_Vec2<double> &point_p, const CL_Vec2<double> &direction_v) : CL_LineRay2x<double>(point_p, direction_v) {}
00168
00169 };
00170
00175 class CL_LineRay3 : public CL_LineRay3x<int>
00176 {
00177 public:
00178 CL_LineRay3() : CL_LineRay3x<int>() {}
00179 CL_LineRay3(const CL_LineRay3x<int> ©) : CL_LineRay3x<int>(copy) {}
00180 CL_LineRay3(const CL_Vec3<int> &point_p, const CL_Vec3<int> &direction_v) : CL_LineRay3x<int>(point_p, direction_v) {}
00181
00182 };
00183
00188 class CL_LineRay3f : public CL_LineRay3x<float>
00189 {
00190 public:
00191 CL_LineRay3f() : CL_LineRay3x<float>() {}
00192 CL_LineRay3f(const CL_LineRay3x<float> ©) : CL_LineRay3x<float>(copy) {}
00193 CL_LineRay3f(const CL_Vec3<float> &point_p, const CL_Vec3<float> &direction_v) : CL_LineRay3x<float>(point_p, direction_v) {}
00194
00195 };
00196
00201 class CL_LineRay3d : public CL_LineRay3x<double>
00202 {
00203 public:
00204 CL_LineRay3d() : CL_LineRay3x<double>() {}
00205 CL_LineRay3d(const CL_LineRay3x<double> ©) : CL_LineRay3x<double>(copy) {}
00206 CL_LineRay3d(const CL_Vec3<double> &point_p, const CL_Vec3<double> &direction_v) : CL_LineRay3x<double>(point_p, direction_v) {}
00207
00208 };
00209