* Vector3 type */
| 16 | * Vector3 type |
| 17 | */ |
| 18 | class Vector3 : public ::Vector3 { |
| 19 | public: |
| 20 | constexpr Vector3(const ::Vector3& vec) : ::Vector3{vec.x, vec.y, vec.z} {} |
| 21 | |
| 22 | constexpr Vector3(float x = 0, float y = 0, float z = 0) : ::Vector3{x, y, z} {} |
| 23 | |
| 24 | Vector3(::Color color) { set(ColorToHSV(color)); } |
| 25 | |
| 26 | GETTERSETTER(float, X, x) |
| 27 | GETTERSETTER(float, Y, y) |
| 28 | GETTERSETTER(float, Z, z) |
| 29 | |
| 30 | Vector3& operator=(const ::Vector3& vector3) { |
| 31 | set(vector3); |
| 32 | return *this; |
| 33 | } |
| 34 | |
| 35 | constexpr bool operator==(const ::Vector3& other) const { return x == other.x && y == other.y && z == other.z; } |
| 36 | |
| 37 | constexpr bool operator!=(const ::Vector3& other) const { return !(*this == other); } |
| 38 | |
| 39 | RLCPP_NODISCARD std::string ToString() const { return TextFormat("Vector3(%f, %f, %f)", x, y, z); } |
| 40 | |
| 41 | operator std::string() const { return ToString(); } |
| 42 | |
| 43 | #ifndef RAYLIB_CPP_NO_MATH |
| 44 | /** |
nothing calls this directly
no outgoing calls
no test coverage detected