mirror of
https://github.com/allankoechke/raylib-cpp.git
synced 2026-11-30 17:19:27 +00:00
40 lines
609 B
C++
40 lines
609 B
C++
#ifndef RAYLIB_CPP_VECTOR4_HPP_
|
|
#define RAYLIB_CPP_VECTOR4_HPP_
|
|
|
|
#include "raylib.h"
|
|
#include "utils.hpp"
|
|
|
|
namespace raylib {
|
|
class Vector4 : public ::Vector4 {
|
|
public:
|
|
Vector4(::Vector4 vec) {
|
|
set(vec);
|
|
};
|
|
|
|
Vector4(float X = 0, float Y = 0, float Z = 0, float W = 0) {
|
|
x = X;
|
|
y = Y;
|
|
z = Z;
|
|
w = W;
|
|
};
|
|
|
|
Vector4(::Color color) {
|
|
set(ColorNormalize(color));
|
|
}
|
|
|
|
inline void set(::Vector4 vec4) {
|
|
x = vec4.x;
|
|
y = vec4.y;
|
|
z = vec4.z;
|
|
w = vec4.w;
|
|
}
|
|
|
|
GETTERSETTER(float,X,x)
|
|
GETTERSETTER(float,Y,y)
|
|
GETTERSETTER(float,Z,z)
|
|
GETTERSETTER(float,W,w)
|
|
};
|
|
}
|
|
|
|
#endif
|