 |
raylib-cpp
C++ object-oriented wrapper library for raylib.
|
25 #ifndef RAYLIB_CPP_INCLUDE_VECTOR3_HPP_
26 #define RAYLIB_CPP_INCLUDE_VECTOR3_HPP_
28 #ifndef RAYLIB_CPP_NO_MATH
32 #include "./raylib.hpp"
33 #include "./raymath.hpp"
34 #include "./raylib-cpp-utils.hpp"
49 set(ColorToHSV(color));
52 GETTERSETTER(
float, X, x)
53 GETTERSETTER(
float, Y, y)
54 GETTERSETTER(
float, Z, z)
67 #ifndef RAYLIB_CPP_NO_MATH
69 return Vector3Add(*
this, vector3);
73 return Vector3Add(*
this, vector3);
77 return Vector3Subtract(*
this, vector3);
81 return Vector3Subtract(*
this, vector3);
85 return Vector3Negate(*
this);
89 return Vector3Negate(*
this);
93 return Vector3Multiply(*
this, vector3);
97 return Vector3Multiply(*
this, vector3);
101 return Vector3Scale(*
this, scale);
105 return Vector3Scale(*
this, scale);
109 return Vector3Divide(*
this, vector3);
113 return Vector3Divide(*
this, vector3);
129 set(Vector3Add(*
this, vector3));
135 set(Vector3Subtract(*
this, vector3));
142 set(Vector3Multiply(*
this, vector3));
148 set(Vector3Scale(*
this, scale));
170 return Vector3Length(*
this);
174 return Vector3Normalize(*
this);
178 return Vector3DotProduct(*
this, vector3);
182 return Vector3Distance(*
this, vector3);
186 return Vector3Lerp(*
this, vector3, amount);
190 return Vector3CrossProduct(*
this, vector3);
194 return Vector3Perpendicular(*
this);
198 return Vector3OrthoNormalize(
this, vector3);
202 return Vector3Transform(*
this, matrix);
206 return Vector3RotateByQuaternion(*
this, quaternion);
210 return Vector3Reflect(*
this, normal);
214 return Vector3Min(*
this, vector3);
218 return Vector3Max(*
this, vector3);
222 return Vector3Barycenter(*
this, a, b, c);
226 return Vector3Zero();
247 ::DrawCircle3D(*
this, radius, rotationAxis, rotationAngle, color);
252 ::DrawCube(*
this, width, height, length, color);
256 ::DrawCubeV(*
this, size, color);
265 ::DrawCubeWiresV(*
this, size, color);
285 ::DrawSphereEx(*
this, radius, rings, slices, color);
295 int slices,
Color color) {
296 ::DrawCylinder(*
this, radiusTop, radiusBottom, height, slices, color);
301 int slices,
Color color) {
320 return CheckCollisionSpheres(*
this, radius1, center2, radius2);
332 #endif // RAYLIB_CPP_INCLUDE_VECTOR3_HPP_
bool CheckCollision(float radius1, Vector3 center2, float radius2)
Detect collision between two spheres.
Provides all the classes associated with raylib-cpp.
Vector3 CrossProduct(const Vector3 &vector3)
Vector3 & operator-=(const Vector3 &vector3)
float Distance(const Vector3 &vector3)
Vector3 operator+(const Vector3 &vector3)
Vector3 Barycenter(const Vector3 &a, const Vector3 &b, const Vector3 &c)
Vector3 operator*(const float scale)
Vector3 & DrawCubeWires(::Vector3 size, ::Color color)
Vector3 & DrawSphereWires(float radius, int rings, int slices, Color color)
Vector3 operator*(const Vector3 &vector3)
Vector3 operator-(const Vector3 &vector3)
Vector3 Add(const Vector3 &vector3)
Vector3 & DrawSphere(float radius, int rings, int slices, Color color)
Vector3(float x, float y, float z)
bool operator==(const ::Vector3 &other)
Vector3 Max(const Vector3 &vector3)
Vector3 & Divide(const float div)
Vector3 Min(const Vector3 &vector3)
Vector3 & DrawCylinderWires(float radiusTop, float radiusBottom, float height, int slices, Color color)
Vector3 & DrawCircle3D(float radius, Vector3 rotationAxis, float rotationAngle, Color color)
Vector3 & DrawCubeTexture(::Texture2D texture, float width, float height, float length, ::Color color)
Vector3 operator/(const Vector3 &vector3)
Vector3(float x, float y)
Vector3 Scale(const float scale)
Vector3 & DrawCube(::Vector3 size, ::Color color)
Vector3 & DrawCylinder(float radiusTop, float radiusBottom, float height, int slices, Color color)
Vector3 & operator*=(const float scale)
Vector3 & DrawLine3D(::Vector3 endPos, ::Color color)
Vector3 & operator/=(const Vector3 &vector3)
Vector3 & operator+=(const Vector3 &vector3)
Vector3 Lerp(const Vector3 &vector3, const float amount)
Vector3 & DrawCubeWires(float width, float height, float length, ::Color color)
Vector3 Transform(const ::Matrix &matrix)
Vector3 operator/(const float div)
Vector3 & operator*=(const Vector3 &vector3)
Vector3 & DrawPlane(::Vector2 size, ::Color color)
Vector3 Multiply(const Vector3 &vector3)
Vector3 Divide(const Vector3 &vector3)
Vector3 & operator/=(const float div)
Vector3 Subtract(const Vector3 &vector3)
Vector3 Reflect(const Vector3 &normal)
float DotProduct(const Vector3 &vector3)
Vector3 & DrawSphere(float radius, Color color)
void OrthoNormalize(Vector3 *vector3)
Vector3 RotateByQuaternion(Quaternion quaternion)
Vector3 & DrawPoint3D(::Color color)
Vector3 & DrawCube(float width, float height, float length, ::Color color)