mirror of
https://github.com/allankoechke/raylib-cpp.git
synced 2026-11-30 10:59:00 +00:00
39 lines
584 B
C++
39 lines
584 B
C++
#ifndef RAYLIB_CPP_VECTOR3_HPP_
|
|
#define RAYLIB_CPP_VECTOR3_HPP_
|
|
|
|
#include "raylib.h"
|
|
#include "utils.hpp"
|
|
|
|
namespace raylib {
|
|
class Vector3 : public ::Vector3 {
|
|
public:
|
|
Vector3(::Vector3 vec) {
|
|
set(vec);
|
|
};
|
|
Vector3(float X = 0, float Y = 0, float Z = 0) {
|
|
x = X;
|
|
y = Y;
|
|
z = Z;
|
|
};
|
|
|
|
Vector3(::Color color) {
|
|
set(ColorToHSV(color));
|
|
}
|
|
inline void set(::Vector3 vec) {
|
|
x = vec.x;
|
|
y = vec.y;
|
|
z = vec.z;
|
|
}
|
|
|
|
GETTERSETTER(float,X,x)
|
|
GETTERSETTER(float,Y,y)
|
|
GETTERSETTER(float,Z,z)
|
|
|
|
void DrawGizmo() {
|
|
::DrawGizmo(*this);
|
|
}
|
|
};
|
|
}
|
|
|
|
#endif
|