47 lines
663 B
C++
47 lines
663 B
C++
#ifndef DEF_GEOMETRY
|
|
#define DEF_GEOMETRY
|
|
|
|
class Point3D;
|
|
class Vector3D;
|
|
|
|
|
|
class Vector3D
|
|
{
|
|
public:
|
|
Vector3D();
|
|
Vector3D(float _x, float _y, float _z);
|
|
|
|
Vector3D Add(Vector3D vector);
|
|
Vector3D Substract(Vector3D vector);
|
|
Vector3D Multiply(float value);
|
|
Vector3D Divide(float value);
|
|
|
|
float Dot(Vector3D vector);
|
|
Vector3D Cross(Vector3D vector);
|
|
|
|
Point3D ToPoint3D();
|
|
bool Null();
|
|
|
|
float x;
|
|
float y;
|
|
float z;
|
|
|
|
};
|
|
|
|
class Point3D
|
|
{
|
|
public:
|
|
Point3D();
|
|
Point3D(float _x, float _y, float _z);
|
|
|
|
Point3D Add(Vector3D vector);
|
|
Point3D Substract(Vector3D vector);
|
|
Point3D Rotate(Vector3D rotation, float angle);
|
|
|
|
|
|
float x;
|
|
float y;
|
|
float z;
|
|
};
|
|
|
|
#endif |