many changes :P
This commit is contained in:
29
geo/Point3.h
Normal file
29
geo/Point3.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#ifndef POINT3_H
|
||||
#define POINT3_H
|
||||
|
||||
/**
|
||||
* 3D Point
|
||||
*/
|
||||
struct Point3 {
|
||||
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
|
||||
/** ctor */
|
||||
Point3() : x(0), y(0), z(0) {;}
|
||||
|
||||
/** ctor */
|
||||
Point3(const float x, const float y, const float z) : x(x), y(y), z(z) {;}
|
||||
|
||||
|
||||
|
||||
Point3 operator + (const Point3& o) const {return Point3(x+o.x, y+o.y, z+o.z);}
|
||||
|
||||
Point3 operator - (const Point3& o) const {return Point3(x-o.x, y-o.y, z-o.z);}
|
||||
|
||||
Point3 operator * (const float v) const {return Point3(v*x, v*y, v*z);}
|
||||
|
||||
};
|
||||
|
||||
#endif // POINT3_H
|
||||
Reference in New Issue
Block a user