1#ifndef RAYLIB_CPP_INCLUDE_VECTOR3_HPP_
2#define RAYLIB_CPP_INCLUDE_VECTOR3_HPP_
4#ifndef RAYLIB_CPP_NO_MATH
9#include "./raymath.hpp"
10#include "./raylib-cpp-utils.hpp"
28 set(ColorToHSV(color));
31 GETTERSETTER(
float, X, x)
32 GETTERSETTER(
float, Y, y)
33 GETTERSETTER(
float, Z, z)
47 return !(*
this == other);
50#ifndef RAYLIB_CPP_NO_MATH
52 return Vector3Add(*
this, vector3);
56 return Vector3Add(*
this, vector3);
60 return Vector3Subtract(*
this, vector3);
64 return Vector3Subtract(*
this, vector3);
68 return Vector3Negate(*
this);
72 return Vector3Negate(*
this);
76 return Vector3Multiply(*
this, vector3);
80 return Vector3Multiply(*
this, vector3);
84 return Vector3Scale(*
this, scale);
88 return Vector3Scale(*
this, scale);
92 return Vector3Divide(*
this, vector3);
96 return Vector3Divide(*
this, vector3);
100 return ::Vector3{x / div, y / div, z / div};
108 set(Vector3Add(*
this, vector3));
114 set(Vector3Subtract(*
this, vector3));
121 set(Vector3Multiply(*
this, vector3));
127 set(Vector3Scale(*
this, scale));
149 return Vector3Length(*
this);
153 return Vector3Normalize(*
this);
157 return Vector3DotProduct(*
this, vector3);
161 return Vector3Distance(*
this, vector3);
164 Vector3 Lerp(const ::Vector3& vector3,
const float amount)
const {
165 return Vector3Lerp(*
this, vector3, amount);
169 return Vector3CrossProduct(*
this, vector3);
173 return Vector3Perpendicular(*
this);
177 Vector3OrthoNormalize(
this, vector3);
181 return Vector3Transform(*
this, matrix);
185 return Vector3RotateByQuaternion(*
this, quaternion);
189 return Vector3Reflect(*
this, normal);
193 return Vector3Min(*
this, vector3);
197 return Vector3Max(*
this, vector3);
201 return Vector3Barycenter(*
this, a, b, c);
205 return Vector3Zero();
225 const ::Vector3& rotationAxis,
228 ::DrawCircle3D(*
this, radius, rotationAxis, rotationAngle, color);
233 ::DrawCube(*
this, width, height, length, color);
238 ::DrawCubeV(*
this, size, color);
248 ::DrawCubeWiresV(*
this, size, color);
253 const ::Texture2D& texture,
268 ::DrawSphereEx(*
this, radius, rings, slices, color);
278 int slices,
Color color) {
279 ::DrawCylinder(*
this, radiusTop, radiusBottom, height, slices, color);
284 int slices,
Color color) {
297 inline bool CheckCollision(
float radius1, const ::Vector3& center2,
float radius2) {
298 return CheckCollisionSpheres(*
this, radius1, center2, radius2);
302 inline void set(const ::Vector3& vec) {
Vector3 & DrawSphere(float radius, ::Color color)
Vector3 operator*(const float scale) const
Vector3 operator/(const ::Vector3 &vector3) const
Vector3(float x, float y)
bool operator!=(const ::Vector3 &other)
Vector3 & operator/=(const ::Vector3 &vector3)
Vector3 operator*(const ::Vector3 &vector3) const
Vector3 Scale(const float scale) const
Vector3(const ::Vector3 &vec)
Vector3 & operator*=(const ::Vector3 &vector3)
Vector3 & DrawPlane(const ::Vector2 &size, ::Color color)
Vector3 & DrawSphereWires(float radius, int rings, int slices, ::Color color)
Vector3 & DrawSphere(float radius, int rings, int slices, ::Color color)
void OrthoNormalize(::Vector3 *vector3)
Vector3 operator/(const float div) const
Vector3(float x, float y, float z)
Vector3 Barycenter(const ::Vector3 &a, const ::Vector3 &b, const ::Vector3 &c)
Vector3 Normalize() const
Vector3 RotateByQuaternion(const ::Quaternion &quaternion)
Vector3 & operator*=(const float scale)
Vector3 operator+(const ::Vector3 &vector3)
Vector3 Transform(const ::Matrix &matrix) const
Vector3 & DrawCubeTexture(const ::Texture2D &texture, float width, float height, float length, ::Color color)
Vector3 & DrawCubeWires(float width, float height, float length, ::Color color)
Vector3 Max(const ::Vector3 &vector3)
Vector3 & DrawCubeWires(const ::Vector3 &size, ::Color color)
Vector3 Add(const ::Vector3 &vector3)
Vector3 Reflect(const ::Vector3 &normal) const
Vector3 Min(const ::Vector3 &vector3)
bool CheckCollision(float radius1, const ::Vector3 ¢er2, float radius2)
Detect collision between two spheres.
Vector3 Perpendicular() const
Vector3 & DrawCylinder(float radiusTop, float radiusBottom, float height, int slices, Color color)
Vector3 Lerp(const ::Vector3 &vector3, const float amount) const
Vector3 operator-(const ::Vector3 &vector3)
bool operator==(const ::Vector3 &other)
Vector3 & DrawCube(float width, float height, float length, ::Color color)
Vector3 Divide(const ::Vector3 &vector3) const
Vector3 CrossProduct(const ::Vector3 &vector3) const
Vector3 Divide(const float div) const
Vector3 & operator+=(const ::Vector3 &vector3)
Vector3 & operator-=(const ::Vector3 &vector3)
Vector3 & DrawPoint3D(::Color color)
Vector3 & DrawLine3D(const ::Vector3 &endPos, ::Color color)
Vector3 & DrawCube(const ::Vector3 &size, ::Color color)
Vector3 & operator/=(const float div)
Vector3 Multiply(const ::Vector3 &vector3) const
float Distance(const ::Vector3 &vector3) const
float DotProduct(const ::Vector3 &vector3)
Vector3 & DrawCylinderWires(float radiusTop, float radiusBottom, float height, int slices, Color color)
Vector3 & DrawCircle3D(float radius, const ::Vector3 &rotationAxis, float rotationAngle, Color color)
Vector3 Subtract(const ::Vector3 &vector3)
All raylib-cpp classes and functions appear in the raylib namespace.