65 |
T x, y, z; |
T x, y, z; |
66 |
Point3() : x(0), y(0), z(0) { } |
Point3() : x(0), y(0), z(0) { } |
67 |
Point3(T x, T y, T z) : x(x), y(y), z(z) { } |
Point3(T x, T y, T z) : x(x), y(y), z(z) { } |
68 |
Point3(Point<T> &p, T z) : x(p.x), y(p.y), z(z) { } |
Point3(Point<T> &p, T z = 0) : x(p.x), y(p.y), z(z) { } |
69 |
Vector3<T> operator-(const Point3 &p) const { |
Vector3<T> operator-(const Point3 &p) const { |
70 |
return Vector3<T>(x - p.x, y - p.y, z - p.z); } |
return Vector3<T>(x - p.x, y - p.y, z - p.z); } |
71 |
Point3<T> operator+(const Vector3<T> v) |
Point3<T> operator+(const Vector3<T> v) |
178 |
typedef Vector<float> Vec; |
typedef Vector<float> Vec; |
179 |
typedef Vector3<float> ZVec; |
typedef Vector3<float> ZVec; |
180 |
|
|
181 |
|
template<class X, class Y, class Z> inline float lerp(X a, Y b, Z fract) { |
182 |
|
return a + fract * (b-a); |
183 |
|
} |
184 |
|
|
185 |
} |
} |
186 |
#endif |
#endif |