18 lines
485 B
C++
18 lines
485 B
C++
#pragma once
|
|
|
|
#include "../../platform/base.hpp"
|
|
#include "vector3d.hpp"
|
|
|
|
namespace engine::math {
|
|
struct point3d : vector3d {
|
|
point3d() = default;
|
|
point3d(float32 x, float32 y, float32 z) : vector3d(x, y, z){};
|
|
inline point3d operator+(const vector3d &v) {
|
|
return point3d(this->x + v.x, this->y + v.y, this->z + v.z);
|
|
};
|
|
inline vector3d operator-(const point3d &b) {
|
|
return vector3d(b.x - this->x, b.y - this->y, b.z - this->z);
|
|
}
|
|
};
|
|
|
|
}; // namespace engine::math
|