Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions include/Camera2D.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ class Camera2D : public ::Camera2D {
// Nothing.
}

Camera2D() : ::Camera2D() {}
Camera2D(::Vector2 offset, ::Vector2 target, float rotation = 0.0f, float zoom = 1.0f)
Camera2D(::Vector2 offset = {}, ::Vector2 target = {}, float rotation = 0.0f, float zoom = 1.0f)
: ::Camera2D{offset, target, rotation, zoom} {}

Camera2D& BeginMode() {
Expand Down
4 changes: 1 addition & 3 deletions include/Camera3D.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,13 @@ class Camera3D : public ::Camera3D {
* @param projection Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC
*/
Camera3D(
::Vector3 position,
::Vector3 position = ::Vector3{0.0f, 0.0f, 0.0f},
::Vector3 target = ::Vector3{0.0f, 0.0f, -1.0f},
::Vector3 up = ::Vector3{0.0f, 1.0f, 0.0f},
float fovy = 45.0f,
int projection = CAMERA_PERSPECTIVE)
: ::Camera3D{position, target, up, fovy, projection} {}

Camera3D() {}

GETTERSETTER(::Vector3, Position, position)
GETTERSETTER(::Vector3, Target, target)
GETTERSETTER(::Vector3, Up, up)
Expand Down
6 changes: 1 addition & 5 deletions include/Rectangle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@ class Rectangle : public ::Rectangle {
public:
constexpr Rectangle(const ::Rectangle& rect) : ::Rectangle{rect.x, rect.y, rect.width, rect.height} {}

constexpr Rectangle(float x, float y, float width, float height) : ::Rectangle{x, y, width, height} {}
constexpr Rectangle(float x, float y, float width) : ::Rectangle{x, y, width, 0} {}
constexpr Rectangle(float x, float y) : ::Rectangle{x, y, 0, 0} {}
constexpr Rectangle(float x) : ::Rectangle{x, 0, 0, 0} {}
constexpr Rectangle() : ::Rectangle{0, 0, 0, 0} {}
constexpr Rectangle(float x = 0, float y = 0, float width = 0, float height = 0) : ::Rectangle{x, y, width, height} {}

constexpr Rectangle(::Vector2 position, ::Vector2 size) : ::Rectangle{position.x, position.y, size.x, size.y} {}
constexpr Rectangle(::Vector2 size) : ::Rectangle{0, 0, size.x, size.y} {}
Expand Down
4 changes: 1 addition & 3 deletions include/Vector2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ class Vector2 : public ::Vector2 {
public:
constexpr Vector2(const ::Vector2& vec) : ::Vector2{vec.x, vec.y} {}

constexpr Vector2(float x, float y) : ::Vector2{x, y} {}
constexpr Vector2(float x) : ::Vector2{x, 0} {}
constexpr Vector2() : ::Vector2{0, 0} {}
constexpr Vector2(float x = 0, float y = 0) : ::Vector2{x, y} {}

GETTERSETTER(float, X, x)
GETTERSETTER(float, Y, y)
Expand Down
5 changes: 1 addition & 4 deletions include/Vector3.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ class Vector3 : public ::Vector3 {
public:
constexpr Vector3(const ::Vector3& vec) : ::Vector3{vec.x, vec.y, vec.z} {}

constexpr Vector3(float x, float y, float z) : ::Vector3{x, y, z} {}
constexpr Vector3(float x, float y) : ::Vector3{x, y, 0} {}
constexpr Vector3(float x) : ::Vector3{x, 0, 0} {}
constexpr Vector3() : ::Vector3{0, 0, 0} {}
constexpr Vector3(float x = 0, float y = 0, float z = 0) : ::Vector3{x, y, z} {}

Vector3(::Color color) { set(ColorToHSV(color)); }

Expand Down
6 changes: 1 addition & 5 deletions include/Vector4.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@ class Vector4 : public ::Vector4 {
public:
constexpr Vector4(const ::Vector4& vec) : ::Vector4{vec.x, vec.y, vec.z, vec.w} {}

constexpr Vector4(float x, float y, float z, float w) : ::Vector4{x, y, z, w} {}
constexpr Vector4(float x, float y, float z) : ::Vector4{x, y, z, 0} {}
constexpr Vector4(float x, float y) : ::Vector4{x, y, 0, 0} {}
constexpr Vector4(float x) : ::Vector4{x, 0, 0, 0} {}
constexpr Vector4() : ::Vector4{0, 0, 0, 0} {}
constexpr Vector4(float x = 0, float y = 0, float z = 0, float w = 0) : ::Vector4{x, y, z, w} {}
constexpr Vector4(::Rectangle rectangle) : ::Vector4{rectangle.x, rectangle.y, rectangle.width, rectangle.height} {}

Vector4(::Color color) { set(ColorNormalize(color)); }
Expand Down
Loading