diff --git a/pyray/__init__.pyi b/pyray/__init__.pyi index 6f57ebb..872547d 100644 --- a/pyray/__init__.pyi +++ b/pyray/__init__.pyi @@ -67,6 +67,11 @@ def check_collision_recs(rec1: Rectangle,rec2: Rectangle,) -> bool: def check_collision_spheres(center1: Vector3,radius1: float,center2: Vector3,radius2: float,) -> bool: """Check collision between two spheres""" ... +def clamp(float_0: float,float_1: float,float_2: float,) -> float: + """float Clamp(float, float, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... def clear_background(color: Color,) -> None: """Set background color (framebuffer clear color)""" ... @@ -458,6 +463,11 @@ def fade(color: Color,alpha: float,) -> Color: def file_exists(fileName: str,) -> bool: """Check if file exists""" ... +def float_equals(float_0: float,float_1: float,) -> int: + """int FloatEquals(float, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... def gen_image_cellular(width: int,height: int,tileSize: int,) -> Image: """Generate image: cellular algorithm, bigger tileSize means bigger cells""" ... @@ -1301,6 +1311,11 @@ def is_window_resized() -> bool: def is_window_state(flag: int,) -> bool: """Check if one specific window flag is enabled""" ... +def lerp(float_0: float,float_1: float,float_2: float,) -> float: + """float Lerp(float, float, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... def load_audio_stream(sampleRate: int,sampleSize: int,channels: int,) -> AudioStream: """Load audio stream (to stream raw audio pcm data)""" ... @@ -1421,6 +1436,111 @@ def load_wave_from_memory(fileType: str,fileData: str,dataSize: int,) -> Wave: def load_wave_samples(wave: Wave,) -> Any: """Load samples data from wave as a 32bit float data array""" ... +def matrix_add(Matrix_0: Matrix,Matrix_1: Matrix,) -> Matrix: + """struct Matrix MatrixAdd(struct Matrix, struct Matrix); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def matrix_determinant(Matrix_0: Matrix,) -> float: + """float MatrixDeterminant(struct Matrix); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def matrix_frustum(double_0: float,double_1: float,double_2: float,double_3: float,double_4: float,double_5: float,) -> Matrix: + """struct Matrix MatrixFrustum(double, double, double, double, double, double); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def matrix_identity() -> Matrix: + """struct Matrix MatrixIdentity(); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def matrix_invert(Matrix_0: Matrix,) -> Matrix: + """struct Matrix MatrixInvert(struct Matrix); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def matrix_look_at(Vector3_0: Vector3,Vector3_1: Vector3,Vector3_2: Vector3,) -> Matrix: + """struct Matrix MatrixLookAt(struct Vector3, struct Vector3, struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def matrix_multiply(Matrix_0: Matrix,Matrix_1: Matrix,) -> Matrix: + """struct Matrix MatrixMultiply(struct Matrix, struct Matrix); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def matrix_ortho(double_0: float,double_1: float,double_2: float,double_3: float,double_4: float,double_5: float,) -> Matrix: + """struct Matrix MatrixOrtho(double, double, double, double, double, double); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def matrix_perspective(double_0: float,double_1: float,double_2: float,double_3: float,) -> Matrix: + """struct Matrix MatrixPerspective(double, double, double, double); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def matrix_rotate(Vector3_0: Vector3,float_1: float,) -> Matrix: + """struct Matrix MatrixRotate(struct Vector3, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def matrix_rotate_x(float_0: float,) -> Matrix: + """struct Matrix MatrixRotateX(float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def matrix_rotate_xyz(Vector3_0: Vector3,) -> Matrix: + """struct Matrix MatrixRotateXYZ(struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def matrix_rotate_y(float_0: float,) -> Matrix: + """struct Matrix MatrixRotateY(float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def matrix_rotate_z(float_0: float,) -> Matrix: + """struct Matrix MatrixRotateZ(float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def matrix_rotate_zyx(Vector3_0: Vector3,) -> Matrix: + """struct Matrix MatrixRotateZYX(struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def matrix_scale(float_0: float,float_1: float,float_2: float,) -> Matrix: + """struct Matrix MatrixScale(float, float, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def matrix_subtract(Matrix_0: Matrix,Matrix_1: Matrix,) -> Matrix: + """struct Matrix MatrixSubtract(struct Matrix, struct Matrix); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def matrix_to_float_v(Matrix_0: Matrix,) -> float16: + """struct float16 MatrixToFloatV(struct Matrix); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def matrix_trace(Matrix_0: Matrix,) -> float: + """float MatrixTrace(struct Matrix); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def matrix_translate(float_0: float,float_1: float,float_2: float,) -> Matrix: + """struct Matrix MatrixTranslate(float, float, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def matrix_transpose(Matrix_0: Matrix,) -> Matrix: + """struct Matrix MatrixTranspose(struct Matrix); + +CFFI C function from raylib._raylib_cffi.lib""" + ... def maximize_window() -> None: """Set window state: maximized, if resizable (only PLATFORM_DESKTOP)""" ... @@ -1442,6 +1562,11 @@ def mem_realloc(ptr: Any,size: int,) -> Any: def minimize_window() -> None: """Set window state: minimized, if resizable (only PLATFORM_DESKTOP)""" ... +def normalize(float_0: float,float_1: float,float_2: float,) -> float: + """float Normalize(float, float, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... def open_url(url: str,) -> None: """Open URL with default system browser (if available)""" ... @@ -1484,6 +1609,126 @@ def play_sound_multi(sound: Sound,) -> None: def poll_input_events() -> None: """Register all input events""" ... +def quaternion_add(Vector4_0: Vector4,Vector4_1: Vector4,) -> Vector4: + """struct Vector4 QuaternionAdd(struct Vector4, struct Vector4); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def quaternion_add_value(Vector4_0: Vector4,float_1: float,) -> Vector4: + """struct Vector4 QuaternionAddValue(struct Vector4, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def quaternion_divide(Vector4_0: Vector4,Vector4_1: Vector4,) -> Vector4: + """struct Vector4 QuaternionDivide(struct Vector4, struct Vector4); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def quaternion_equals(Vector4_0: Vector4,Vector4_1: Vector4,) -> int: + """int QuaternionEquals(struct Vector4, struct Vector4); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def quaternion_from_axis_angle(Vector3_0: Vector3,float_1: float,) -> Vector4: + """struct Vector4 QuaternionFromAxisAngle(struct Vector3, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def quaternion_from_euler(float_0: float,float_1: float,float_2: float,) -> Vector4: + """struct Vector4 QuaternionFromEuler(float, float, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def quaternion_from_matrix(Matrix_0: Matrix,) -> Vector4: + """struct Vector4 QuaternionFromMatrix(struct Matrix); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def quaternion_from_vector3_to_vector3(Vector3_0: Vector3,Vector3_1: Vector3,) -> Vector4: + """struct Vector4 QuaternionFromVector3ToVector3(struct Vector3, struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def quaternion_identity() -> Vector4: + """struct Vector4 QuaternionIdentity(); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def quaternion_invert(Vector4_0: Vector4,) -> Vector4: + """struct Vector4 QuaternionInvert(struct Vector4); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def quaternion_length(Vector4_0: Vector4,) -> float: + """float QuaternionLength(struct Vector4); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def quaternion_lerp(Vector4_0: Vector4,Vector4_1: Vector4,float_2: float,) -> Vector4: + """struct Vector4 QuaternionLerp(struct Vector4, struct Vector4, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def quaternion_multiply(Vector4_0: Vector4,Vector4_1: Vector4,) -> Vector4: + """struct Vector4 QuaternionMultiply(struct Vector4, struct Vector4); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def quaternion_nlerp(Vector4_0: Vector4,Vector4_1: Vector4,float_2: float,) -> Vector4: + """struct Vector4 QuaternionNlerp(struct Vector4, struct Vector4, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def quaternion_normalize(Vector4_0: Vector4,) -> Vector4: + """struct Vector4 QuaternionNormalize(struct Vector4); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def quaternion_scale(Vector4_0: Vector4,float_1: float,) -> Vector4: + """struct Vector4 QuaternionScale(struct Vector4, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def quaternion_slerp(Vector4_0: Vector4,Vector4_1: Vector4,float_2: float,) -> Vector4: + """struct Vector4 QuaternionSlerp(struct Vector4, struct Vector4, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def quaternion_subtract(Vector4_0: Vector4,Vector4_1: Vector4,) -> Vector4: + """struct Vector4 QuaternionSubtract(struct Vector4, struct Vector4); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def quaternion_subtract_value(Vector4_0: Vector4,float_1: float,) -> Vector4: + """struct Vector4 QuaternionSubtractValue(struct Vector4, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def quaternion_to_axis_angle(Vector4_0: Vector4,Vector3_pointer_1: Any,float_pointer_2: Any,) -> None: + """void QuaternionToAxisAngle(struct Vector4, struct Vector3 *, float *); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def quaternion_to_euler(Vector4_0: Vector4,) -> Vector3: + """struct Vector3 QuaternionToEuler(struct Vector4); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def quaternion_to_matrix(Vector4_0: Vector4,) -> Matrix: + """struct Matrix QuaternionToMatrix(struct Vector4); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def quaternion_transform(Vector4_0: Vector4,Matrix_1: Matrix,) -> Vector4: + """struct Vector4 QuaternionTransform(struct Vector4, struct Matrix); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def remap(float_0: float,float_1: float,float_2: float,float_3: float,float_4: float,) -> float: + """float Remap(float, float, float, float, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... def reset_physics() -> None: """void ResetPhysics(); @@ -1866,6 +2111,306 @@ def update_texture_rec(texture: Texture,rec: Rectangle,pixels: Any,) -> None: def upload_mesh(mesh: Any,dynamic: bool,) -> None: """Upload mesh vertex data in GPU and provide VAO/VBO ids""" ... +def vector2_add(Vector2_0: Vector2,Vector2_1: Vector2,) -> Vector2: + """struct Vector2 Vector2Add(struct Vector2, struct Vector2); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector2_add_value(Vector2_0: Vector2,float_1: float,) -> Vector2: + """struct Vector2 Vector2AddValue(struct Vector2, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector2_angle(Vector2_0: Vector2,Vector2_1: Vector2,) -> float: + """float Vector2Angle(struct Vector2, struct Vector2); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector2_clamp(Vector2_0: Vector2,Vector2_1: Vector2,Vector2_2: Vector2,) -> Vector2: + """struct Vector2 Vector2Clamp(struct Vector2, struct Vector2, struct Vector2); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector2_clamp_value(Vector2_0: Vector2,float_1: float,float_2: float,) -> Vector2: + """struct Vector2 Vector2ClampValue(struct Vector2, float, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector_2distance(Vector2_0: Vector2,Vector2_1: Vector2,) -> float: + """float Vector2Distance(struct Vector2, struct Vector2); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector_2distance_sqr(Vector2_0: Vector2,Vector2_1: Vector2,) -> float: + """float Vector2DistanceSqr(struct Vector2, struct Vector2); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector_2divide(Vector2_0: Vector2,Vector2_1: Vector2,) -> Vector2: + """struct Vector2 Vector2Divide(struct Vector2, struct Vector2); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector_2dot_product(Vector2_0: Vector2,Vector2_1: Vector2,) -> float: + """float Vector2DotProduct(struct Vector2, struct Vector2); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector2_equals(Vector2_0: Vector2,Vector2_1: Vector2,) -> int: + """int Vector2Equals(struct Vector2, struct Vector2); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector2_invert(Vector2_0: Vector2,) -> Vector2: + """struct Vector2 Vector2Invert(struct Vector2); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector2_length(Vector2_0: Vector2,) -> float: + """float Vector2Length(struct Vector2); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector2_length_sqr(Vector2_0: Vector2,) -> float: + """float Vector2LengthSqr(struct Vector2); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector2_lerp(Vector2_0: Vector2,Vector2_1: Vector2,float_2: float,) -> Vector2: + """struct Vector2 Vector2Lerp(struct Vector2, struct Vector2, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector2_move_towards(Vector2_0: Vector2,Vector2_1: Vector2,float_2: float,) -> Vector2: + """struct Vector2 Vector2MoveTowards(struct Vector2, struct Vector2, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector2_multiply(Vector2_0: Vector2,Vector2_1: Vector2,) -> Vector2: + """struct Vector2 Vector2Multiply(struct Vector2, struct Vector2); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector2_negate(Vector2_0: Vector2,) -> Vector2: + """struct Vector2 Vector2Negate(struct Vector2); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector2_normalize(Vector2_0: Vector2,) -> Vector2: + """struct Vector2 Vector2Normalize(struct Vector2); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector2_one() -> Vector2: + """struct Vector2 Vector2One(); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector2_reflect(Vector2_0: Vector2,Vector2_1: Vector2,) -> Vector2: + """struct Vector2 Vector2Reflect(struct Vector2, struct Vector2); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector2_rotate(Vector2_0: Vector2,float_1: float,) -> Vector2: + """struct Vector2 Vector2Rotate(struct Vector2, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector2_scale(Vector2_0: Vector2,float_1: float,) -> Vector2: + """struct Vector2 Vector2Scale(struct Vector2, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector2_subtract(Vector2_0: Vector2,Vector2_1: Vector2,) -> Vector2: + """struct Vector2 Vector2Subtract(struct Vector2, struct Vector2); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector2_subtract_value(Vector2_0: Vector2,float_1: float,) -> Vector2: + """struct Vector2 Vector2SubtractValue(struct Vector2, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector2_transform(Vector2_0: Vector2,Matrix_1: Matrix,) -> Vector2: + """struct Vector2 Vector2Transform(struct Vector2, struct Matrix); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector2_zero() -> Vector2: + """struct Vector2 Vector2Zero(); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector3_add(Vector3_0: Vector3,Vector3_1: Vector3,) -> Vector3: + """struct Vector3 Vector3Add(struct Vector3, struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector3_add_value(Vector3_0: Vector3,float_1: float,) -> Vector3: + """struct Vector3 Vector3AddValue(struct Vector3, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector3_angle(Vector3_0: Vector3,Vector3_1: Vector3,) -> float: + """float Vector3Angle(struct Vector3, struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector3_barycenter(Vector3_0: Vector3,Vector3_1: Vector3,Vector3_2: Vector3,Vector3_3: Vector3,) -> Vector3: + """struct Vector3 Vector3Barycenter(struct Vector3, struct Vector3, struct Vector3, struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector3_clamp(Vector3_0: Vector3,Vector3_1: Vector3,Vector3_2: Vector3,) -> Vector3: + """struct Vector3 Vector3Clamp(struct Vector3, struct Vector3, struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector3_clamp_value(Vector3_0: Vector3,float_1: float,float_2: float,) -> Vector3: + """struct Vector3 Vector3ClampValue(struct Vector3, float, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector3_cross_product(Vector3_0: Vector3,Vector3_1: Vector3,) -> Vector3: + """struct Vector3 Vector3CrossProduct(struct Vector3, struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector_3distance(Vector3_0: Vector3,Vector3_1: Vector3,) -> float: + """float Vector3Distance(struct Vector3, struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector_3distance_sqr(Vector3_0: Vector3,Vector3_1: Vector3,) -> float: + """float Vector3DistanceSqr(struct Vector3, struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector_3divide(Vector3_0: Vector3,Vector3_1: Vector3,) -> Vector3: + """struct Vector3 Vector3Divide(struct Vector3, struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector_3dot_product(Vector3_0: Vector3,Vector3_1: Vector3,) -> float: + """float Vector3DotProduct(struct Vector3, struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector3_equals(Vector3_0: Vector3,Vector3_1: Vector3,) -> int: + """int Vector3Equals(struct Vector3, struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector3_invert(Vector3_0: Vector3,) -> Vector3: + """struct Vector3 Vector3Invert(struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector3_length(Vector3_0: Vector3,) -> float: + """float Vector3Length(struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector3_length_sqr(Vector3_0: Vector3,) -> float: + """float Vector3LengthSqr(struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector3_lerp(Vector3_0: Vector3,Vector3_1: Vector3,float_2: float,) -> Vector3: + """struct Vector3 Vector3Lerp(struct Vector3, struct Vector3, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector3_max(Vector3_0: Vector3,Vector3_1: Vector3,) -> Vector3: + """struct Vector3 Vector3Max(struct Vector3, struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector3_min(Vector3_0: Vector3,Vector3_1: Vector3,) -> Vector3: + """struct Vector3 Vector3Min(struct Vector3, struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector3_multiply(Vector3_0: Vector3,Vector3_1: Vector3,) -> Vector3: + """struct Vector3 Vector3Multiply(struct Vector3, struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector3_negate(Vector3_0: Vector3,) -> Vector3: + """struct Vector3 Vector3Negate(struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector3_normalize(Vector3_0: Vector3,) -> Vector3: + """struct Vector3 Vector3Normalize(struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector3_one() -> Vector3: + """struct Vector3 Vector3One(); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector3_ortho_normalize(Vector3_pointer_0: Any,Vector3_pointer_1: Any,) -> None: + """void Vector3OrthoNormalize(struct Vector3 *, struct Vector3 *); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector3_perpendicular(Vector3_0: Vector3,) -> Vector3: + """struct Vector3 Vector3Perpendicular(struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector3_reflect(Vector3_0: Vector3,Vector3_1: Vector3,) -> Vector3: + """struct Vector3 Vector3Reflect(struct Vector3, struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector3_refract(Vector3_0: Vector3,Vector3_1: Vector3,float_2: float,) -> Vector3: + """struct Vector3 Vector3Refract(struct Vector3, struct Vector3, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector3_rotate_by_quaternion(Vector3_0: Vector3,Vector4_1: Vector4,) -> Vector3: + """struct Vector3 Vector3RotateByQuaternion(struct Vector3, struct Vector4); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector3_scale(Vector3_0: Vector3,float_1: float,) -> Vector3: + """struct Vector3 Vector3Scale(struct Vector3, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector3_subtract(Vector3_0: Vector3,Vector3_1: Vector3,) -> Vector3: + """struct Vector3 Vector3Subtract(struct Vector3, struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector3_subtract_value(Vector3_0: Vector3,float_1: float,) -> Vector3: + """struct Vector3 Vector3SubtractValue(struct Vector3, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector3_to_float_v(Vector3_0: Vector3,) -> float3: + """struct float3 Vector3ToFloatV(struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector3_transform(Vector3_0: Vector3,Matrix_1: Matrix,) -> Vector3: + """struct Vector3 Vector3Transform(struct Vector3, struct Matrix); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector3_unproject(Vector3_0: Vector3,Matrix_1: Matrix,Matrix_2: Matrix,) -> Vector3: + """struct Vector3 Vector3Unproject(struct Vector3, struct Matrix, struct Matrix); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def vector3_zero() -> Vector3: + """struct Vector3 Vector3Zero(); + +CFFI C function from raylib._raylib_cffi.lib""" + ... def wait_time(seconds: float,) -> None: """Wait for some time (halt program execution)""" ... @@ -2944,6 +3489,14 @@ class Wave: self.sampleSize=sampleSize self.channels=channels self.data=data +class float16: + """ struct """ + def __init__(self, v): + self.v=v +class float3: + """ struct """ + def __init__(self, v): + self.v=v class rlDrawCall: """ struct """ def __init__(self, mode, vertexCount, vertexAlignment, textureId): diff --git a/raylib/__init__.pyi b/raylib/__init__.pyi index 04d0ea4..a66a822 100644 --- a/raylib/__init__.pyi +++ b/raylib/__init__.pyi @@ -107,6 +107,11 @@ def CheckCollisionRecs(rec1: Rectangle,rec2: Rectangle,) -> bool: def CheckCollisionSpheres(center1: Vector3,radius1: float,center2: Vector3,radius2: float,) -> bool: """Check collision between two spheres""" ... +def Clamp(float_0: float,float_1: float,float_2: float,) -> float: + """float Clamp(float, float, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... def ClearBackground(color: Color,) -> None: """Set background color (framebuffer clear color)""" ... @@ -519,6 +524,11 @@ def Fade(color: Color,alpha: float,) -> Color: def FileExists(fileName: str,) -> bool: """Check if file exists""" ... +def FloatEquals(float_0: float,float_1: float,) -> int: + """int FloatEquals(float, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... GAMEPAD_AXIS_LEFT_TRIGGER: int GAMEPAD_AXIS_LEFT_X: int GAMEPAD_AXIS_LEFT_Y: int @@ -1781,6 +1791,11 @@ LOG_INFO: int LOG_NONE: int LOG_TRACE: int LOG_WARNING: int +def Lerp(float_0: float,float_1: float,float_2: float,) -> float: + """float Lerp(float, float, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... def LoadAudioStream(sampleRate: int,sampleSize: int,channels: int,) -> AudioStream: """Load audio stream (to stream raw audio pcm data)""" ... @@ -1930,6 +1945,111 @@ MOUSE_CURSOR_RESIZE_EW: int MOUSE_CURSOR_RESIZE_NESW: int MOUSE_CURSOR_RESIZE_NS: int MOUSE_CURSOR_RESIZE_NWSE: int +def MatrixAdd(Matrix_0: Matrix,Matrix_1: Matrix,) -> Matrix: + """struct Matrix MatrixAdd(struct Matrix, struct Matrix); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def MatrixDeterminant(Matrix_0: Matrix,) -> float: + """float MatrixDeterminant(struct Matrix); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def MatrixFrustum(double_0: float,double_1: float,double_2: float,double_3: float,double_4: float,double_5: float,) -> Matrix: + """struct Matrix MatrixFrustum(double, double, double, double, double, double); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def MatrixIdentity() -> Matrix: + """struct Matrix MatrixIdentity(); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def MatrixInvert(Matrix_0: Matrix,) -> Matrix: + """struct Matrix MatrixInvert(struct Matrix); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def MatrixLookAt(Vector3_0: Vector3,Vector3_1: Vector3,Vector3_2: Vector3,) -> Matrix: + """struct Matrix MatrixLookAt(struct Vector3, struct Vector3, struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def MatrixMultiply(Matrix_0: Matrix,Matrix_1: Matrix,) -> Matrix: + """struct Matrix MatrixMultiply(struct Matrix, struct Matrix); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def MatrixOrtho(double_0: float,double_1: float,double_2: float,double_3: float,double_4: float,double_5: float,) -> Matrix: + """struct Matrix MatrixOrtho(double, double, double, double, double, double); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def MatrixPerspective(double_0: float,double_1: float,double_2: float,double_3: float,) -> Matrix: + """struct Matrix MatrixPerspective(double, double, double, double); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def MatrixRotate(Vector3_0: Vector3,float_1: float,) -> Matrix: + """struct Matrix MatrixRotate(struct Vector3, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def MatrixRotateX(float_0: float,) -> Matrix: + """struct Matrix MatrixRotateX(float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def MatrixRotateXYZ(Vector3_0: Vector3,) -> Matrix: + """struct Matrix MatrixRotateXYZ(struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def MatrixRotateY(float_0: float,) -> Matrix: + """struct Matrix MatrixRotateY(float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def MatrixRotateZ(float_0: float,) -> Matrix: + """struct Matrix MatrixRotateZ(float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def MatrixRotateZYX(Vector3_0: Vector3,) -> Matrix: + """struct Matrix MatrixRotateZYX(struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def MatrixScale(float_0: float,float_1: float,float_2: float,) -> Matrix: + """struct Matrix MatrixScale(float, float, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def MatrixSubtract(Matrix_0: Matrix,Matrix_1: Matrix,) -> Matrix: + """struct Matrix MatrixSubtract(struct Matrix, struct Matrix); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def MatrixToFloatV(Matrix_0: Matrix,) -> float16: + """struct float16 MatrixToFloatV(struct Matrix); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def MatrixTrace(Matrix_0: Matrix,) -> float: + """float MatrixTrace(struct Matrix); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def MatrixTranslate(float_0: float,float_1: float,float_2: float,) -> Matrix: + """struct Matrix MatrixTranslate(float, float, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def MatrixTranspose(Matrix_0: Matrix,) -> Matrix: + """struct Matrix MatrixTranspose(struct Matrix); + +CFFI C function from raylib._raylib_cffi.lib""" + ... def MaximizeWindow() -> None: """Set window state: maximized, if resizable (only PLATFORM_DESKTOP)""" ... @@ -1954,6 +2074,11 @@ def MinimizeWindow() -> None: NPATCH_NINE_PATCH: int NPATCH_THREE_PATCH_HORIZONTAL: int NPATCH_THREE_PATCH_VERTICAL: int +def Normalize(float_0: float,float_1: float,float_2: float,) -> float: + """float Normalize(float, float, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... OPENGL_11: int OPENGL_21: int OPENGL_33: int @@ -2026,6 +2151,121 @@ def PlaySoundMulti(sound: Sound,) -> None: def PollInputEvents() -> None: """Register all input events""" ... +def QuaternionAdd(Vector4_0: Vector4,Vector4_1: Vector4,) -> Vector4: + """struct Vector4 QuaternionAdd(struct Vector4, struct Vector4); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def QuaternionAddValue(Vector4_0: Vector4,float_1: float,) -> Vector4: + """struct Vector4 QuaternionAddValue(struct Vector4, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def QuaternionDivide(Vector4_0: Vector4,Vector4_1: Vector4,) -> Vector4: + """struct Vector4 QuaternionDivide(struct Vector4, struct Vector4); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def QuaternionEquals(Vector4_0: Vector4,Vector4_1: Vector4,) -> int: + """int QuaternionEquals(struct Vector4, struct Vector4); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def QuaternionFromAxisAngle(Vector3_0: Vector3,float_1: float,) -> Vector4: + """struct Vector4 QuaternionFromAxisAngle(struct Vector3, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def QuaternionFromEuler(float_0: float,float_1: float,float_2: float,) -> Vector4: + """struct Vector4 QuaternionFromEuler(float, float, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def QuaternionFromMatrix(Matrix_0: Matrix,) -> Vector4: + """struct Vector4 QuaternionFromMatrix(struct Matrix); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def QuaternionFromVector3ToVector3(Vector3_0: Vector3,Vector3_1: Vector3,) -> Vector4: + """struct Vector4 QuaternionFromVector3ToVector3(struct Vector3, struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def QuaternionIdentity() -> Vector4: + """struct Vector4 QuaternionIdentity(); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def QuaternionInvert(Vector4_0: Vector4,) -> Vector4: + """struct Vector4 QuaternionInvert(struct Vector4); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def QuaternionLength(Vector4_0: Vector4,) -> float: + """float QuaternionLength(struct Vector4); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def QuaternionLerp(Vector4_0: Vector4,Vector4_1: Vector4,float_2: float,) -> Vector4: + """struct Vector4 QuaternionLerp(struct Vector4, struct Vector4, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def QuaternionMultiply(Vector4_0: Vector4,Vector4_1: Vector4,) -> Vector4: + """struct Vector4 QuaternionMultiply(struct Vector4, struct Vector4); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def QuaternionNlerp(Vector4_0: Vector4,Vector4_1: Vector4,float_2: float,) -> Vector4: + """struct Vector4 QuaternionNlerp(struct Vector4, struct Vector4, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def QuaternionNormalize(Vector4_0: Vector4,) -> Vector4: + """struct Vector4 QuaternionNormalize(struct Vector4); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def QuaternionScale(Vector4_0: Vector4,float_1: float,) -> Vector4: + """struct Vector4 QuaternionScale(struct Vector4, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def QuaternionSlerp(Vector4_0: Vector4,Vector4_1: Vector4,float_2: float,) -> Vector4: + """struct Vector4 QuaternionSlerp(struct Vector4, struct Vector4, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def QuaternionSubtract(Vector4_0: Vector4,Vector4_1: Vector4,) -> Vector4: + """struct Vector4 QuaternionSubtract(struct Vector4, struct Vector4); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def QuaternionSubtractValue(Vector4_0: Vector4,float_1: float,) -> Vector4: + """struct Vector4 QuaternionSubtractValue(struct Vector4, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def QuaternionToAxisAngle(Vector4_0: Vector4,Vector3_pointer_1: Any,float_pointer_2: Any,) -> None: + """void QuaternionToAxisAngle(struct Vector4, struct Vector3 *, float *); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def QuaternionToEuler(Vector4_0: Vector4,) -> Vector3: + """struct Vector3 QuaternionToEuler(struct Vector4); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def QuaternionToMatrix(Vector4_0: Vector4,) -> Matrix: + """struct Matrix QuaternionToMatrix(struct Vector4); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def QuaternionTransform(Vector4_0: Vector4,Matrix_1: Matrix,) -> Vector4: + """struct Vector4 QuaternionTransform(struct Vector4, struct Matrix); + +CFFI C function from raylib._raylib_cffi.lib""" + ... RESERVED: int RL_ATTACHMENT_COLOR_CHANNEL0: int RL_ATTACHMENT_COLOR_CHANNEL1: int @@ -2126,6 +2366,11 @@ RL_TEXTURE_FILTER_ANISOTROPIC_8X: int RL_TEXTURE_FILTER_BILINEAR: int RL_TEXTURE_FILTER_POINT: int RL_TEXTURE_FILTER_TRILINEAR: int +def Remap(float_0: float,float_1: float,float_2: float,float_3: float,float_4: float,) -> float: + """float Remap(float, float, float, float, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... def ResetPhysics() -> None: """void ResetPhysics(); @@ -2591,6 +2836,306 @@ def UploadMesh(mesh: Any,dynamic: bool,) -> None: """Upload mesh vertex data in GPU and provide VAO/VBO ids""" ... VALUEBOX: int +def Vector2Add(Vector2_0: Vector2,Vector2_1: Vector2,) -> Vector2: + """struct Vector2 Vector2Add(struct Vector2, struct Vector2); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector2AddValue(Vector2_0: Vector2,float_1: float,) -> Vector2: + """struct Vector2 Vector2AddValue(struct Vector2, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector2Angle(Vector2_0: Vector2,Vector2_1: Vector2,) -> float: + """float Vector2Angle(struct Vector2, struct Vector2); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector2Clamp(Vector2_0: Vector2,Vector2_1: Vector2,Vector2_2: Vector2,) -> Vector2: + """struct Vector2 Vector2Clamp(struct Vector2, struct Vector2, struct Vector2); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector2ClampValue(Vector2_0: Vector2,float_1: float,float_2: float,) -> Vector2: + """struct Vector2 Vector2ClampValue(struct Vector2, float, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector2Distance(Vector2_0: Vector2,Vector2_1: Vector2,) -> float: + """float Vector2Distance(struct Vector2, struct Vector2); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector2DistanceSqr(Vector2_0: Vector2,Vector2_1: Vector2,) -> float: + """float Vector2DistanceSqr(struct Vector2, struct Vector2); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector2Divide(Vector2_0: Vector2,Vector2_1: Vector2,) -> Vector2: + """struct Vector2 Vector2Divide(struct Vector2, struct Vector2); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector2DotProduct(Vector2_0: Vector2,Vector2_1: Vector2,) -> float: + """float Vector2DotProduct(struct Vector2, struct Vector2); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector2Equals(Vector2_0: Vector2,Vector2_1: Vector2,) -> int: + """int Vector2Equals(struct Vector2, struct Vector2); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector2Invert(Vector2_0: Vector2,) -> Vector2: + """struct Vector2 Vector2Invert(struct Vector2); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector2Length(Vector2_0: Vector2,) -> float: + """float Vector2Length(struct Vector2); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector2LengthSqr(Vector2_0: Vector2,) -> float: + """float Vector2LengthSqr(struct Vector2); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector2Lerp(Vector2_0: Vector2,Vector2_1: Vector2,float_2: float,) -> Vector2: + """struct Vector2 Vector2Lerp(struct Vector2, struct Vector2, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector2MoveTowards(Vector2_0: Vector2,Vector2_1: Vector2,float_2: float,) -> Vector2: + """struct Vector2 Vector2MoveTowards(struct Vector2, struct Vector2, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector2Multiply(Vector2_0: Vector2,Vector2_1: Vector2,) -> Vector2: + """struct Vector2 Vector2Multiply(struct Vector2, struct Vector2); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector2Negate(Vector2_0: Vector2,) -> Vector2: + """struct Vector2 Vector2Negate(struct Vector2); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector2Normalize(Vector2_0: Vector2,) -> Vector2: + """struct Vector2 Vector2Normalize(struct Vector2); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector2One() -> Vector2: + """struct Vector2 Vector2One(); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector2Reflect(Vector2_0: Vector2,Vector2_1: Vector2,) -> Vector2: + """struct Vector2 Vector2Reflect(struct Vector2, struct Vector2); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector2Rotate(Vector2_0: Vector2,float_1: float,) -> Vector2: + """struct Vector2 Vector2Rotate(struct Vector2, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector2Scale(Vector2_0: Vector2,float_1: float,) -> Vector2: + """struct Vector2 Vector2Scale(struct Vector2, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector2Subtract(Vector2_0: Vector2,Vector2_1: Vector2,) -> Vector2: + """struct Vector2 Vector2Subtract(struct Vector2, struct Vector2); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector2SubtractValue(Vector2_0: Vector2,float_1: float,) -> Vector2: + """struct Vector2 Vector2SubtractValue(struct Vector2, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector2Transform(Vector2_0: Vector2,Matrix_1: Matrix,) -> Vector2: + """struct Vector2 Vector2Transform(struct Vector2, struct Matrix); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector2Zero() -> Vector2: + """struct Vector2 Vector2Zero(); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector3Add(Vector3_0: Vector3,Vector3_1: Vector3,) -> Vector3: + """struct Vector3 Vector3Add(struct Vector3, struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector3AddValue(Vector3_0: Vector3,float_1: float,) -> Vector3: + """struct Vector3 Vector3AddValue(struct Vector3, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector3Angle(Vector3_0: Vector3,Vector3_1: Vector3,) -> float: + """float Vector3Angle(struct Vector3, struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector3Barycenter(Vector3_0: Vector3,Vector3_1: Vector3,Vector3_2: Vector3,Vector3_3: Vector3,) -> Vector3: + """struct Vector3 Vector3Barycenter(struct Vector3, struct Vector3, struct Vector3, struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector3Clamp(Vector3_0: Vector3,Vector3_1: Vector3,Vector3_2: Vector3,) -> Vector3: + """struct Vector3 Vector3Clamp(struct Vector3, struct Vector3, struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector3ClampValue(Vector3_0: Vector3,float_1: float,float_2: float,) -> Vector3: + """struct Vector3 Vector3ClampValue(struct Vector3, float, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector3CrossProduct(Vector3_0: Vector3,Vector3_1: Vector3,) -> Vector3: + """struct Vector3 Vector3CrossProduct(struct Vector3, struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector3Distance(Vector3_0: Vector3,Vector3_1: Vector3,) -> float: + """float Vector3Distance(struct Vector3, struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector3DistanceSqr(Vector3_0: Vector3,Vector3_1: Vector3,) -> float: + """float Vector3DistanceSqr(struct Vector3, struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector3Divide(Vector3_0: Vector3,Vector3_1: Vector3,) -> Vector3: + """struct Vector3 Vector3Divide(struct Vector3, struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector3DotProduct(Vector3_0: Vector3,Vector3_1: Vector3,) -> float: + """float Vector3DotProduct(struct Vector3, struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector3Equals(Vector3_0: Vector3,Vector3_1: Vector3,) -> int: + """int Vector3Equals(struct Vector3, struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector3Invert(Vector3_0: Vector3,) -> Vector3: + """struct Vector3 Vector3Invert(struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector3Length(Vector3_0: Vector3,) -> float: + """float Vector3Length(struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector3LengthSqr(Vector3_0: Vector3,) -> float: + """float Vector3LengthSqr(struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector3Lerp(Vector3_0: Vector3,Vector3_1: Vector3,float_2: float,) -> Vector3: + """struct Vector3 Vector3Lerp(struct Vector3, struct Vector3, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector3Max(Vector3_0: Vector3,Vector3_1: Vector3,) -> Vector3: + """struct Vector3 Vector3Max(struct Vector3, struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector3Min(Vector3_0: Vector3,Vector3_1: Vector3,) -> Vector3: + """struct Vector3 Vector3Min(struct Vector3, struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector3Multiply(Vector3_0: Vector3,Vector3_1: Vector3,) -> Vector3: + """struct Vector3 Vector3Multiply(struct Vector3, struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector3Negate(Vector3_0: Vector3,) -> Vector3: + """struct Vector3 Vector3Negate(struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector3Normalize(Vector3_0: Vector3,) -> Vector3: + """struct Vector3 Vector3Normalize(struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector3One() -> Vector3: + """struct Vector3 Vector3One(); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector3OrthoNormalize(Vector3_pointer_0: Any,Vector3_pointer_1: Any,) -> None: + """void Vector3OrthoNormalize(struct Vector3 *, struct Vector3 *); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector3Perpendicular(Vector3_0: Vector3,) -> Vector3: + """struct Vector3 Vector3Perpendicular(struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector3Reflect(Vector3_0: Vector3,Vector3_1: Vector3,) -> Vector3: + """struct Vector3 Vector3Reflect(struct Vector3, struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector3Refract(Vector3_0: Vector3,Vector3_1: Vector3,float_2: float,) -> Vector3: + """struct Vector3 Vector3Refract(struct Vector3, struct Vector3, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector3RotateByQuaternion(Vector3_0: Vector3,Vector4_1: Vector4,) -> Vector3: + """struct Vector3 Vector3RotateByQuaternion(struct Vector3, struct Vector4); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector3Scale(Vector3_0: Vector3,float_1: float,) -> Vector3: + """struct Vector3 Vector3Scale(struct Vector3, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector3Subtract(Vector3_0: Vector3,Vector3_1: Vector3,) -> Vector3: + """struct Vector3 Vector3Subtract(struct Vector3, struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector3SubtractValue(Vector3_0: Vector3,float_1: float,) -> Vector3: + """struct Vector3 Vector3SubtractValue(struct Vector3, float); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector3ToFloatV(Vector3_0: Vector3,) -> float3: + """struct float3 Vector3ToFloatV(struct Vector3); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector3Transform(Vector3_0: Vector3,Matrix_1: Matrix,) -> Vector3: + """struct Vector3 Vector3Transform(struct Vector3, struct Matrix); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector3Unproject(Vector3_0: Vector3,Matrix_1: Matrix,Matrix_2: Matrix,) -> Vector3: + """struct Vector3 Vector3Unproject(struct Vector3, struct Matrix, struct Matrix); + +CFFI C function from raylib._raylib_cffi.lib""" + ... +def Vector3Zero() -> Vector3: + """struct Vector3 Vector3Zero(); + +CFFI C function from raylib._raylib_cffi.lib""" + ... def WaitTime(seconds: float,) -> None: """Wait for some time (halt program execution)""" ... @@ -3398,6 +3943,8 @@ Vector4: struct VrDeviceInfo: struct VrStereoConfig: struct Wave: struct +float16: struct +float3: struct rAudioBuffer: struct rAudioProcessor: struct rlBlendMode: int diff --git a/raylib/build.py b/raylib/build.py index dd224ce..966c660 100644 --- a/raylib/build.py +++ b/raylib/build.py @@ -16,6 +16,7 @@ # Raylib must be installed and compiled with: cmake -DWITH_PIC=ON -DSHARED=ON -DSTATIC=ON .. # We use /usr/local/lib/libraylib.a to ensure we link to static version +import re from cffi import FFI import os @@ -41,21 +42,23 @@ def get_the_lib_path(): stdout=subprocess.PIPE).stdout.strip() -def pre_process_header(filename): +def pre_process_header(filename, remove_function_bodies=False): print("Pre-processing " + filename) file = open(filename, "r") filetext = "".join([line for line in file if '#include' not in line]) command = ['gcc', '-CC', '-P', '-undef', '-nostdinc', '-DRL_MATRIX_TYPE', '-DRL_QUATERNION_TYPE','-DRL_VECTOR4_TYPE','-DRL_VECTOR3_TYPE','-DRL_VECTOR2_TYPE', - '-DRLAPI=', '-DPHYSACDEF=', '-DRAYGUIDEF=', + '-DRLAPI=', '-DPHYSACDEF=', '-DRAYGUIDEF=','-DRMAPI=', '-dDI', '-E', '-'] - filetext2 = subprocess.run(command, text=True, input=filetext, stdout=subprocess.PIPE).stdout - filetext3 = filetext2.replace("va_list", "void *") - filetext4 = "\n".join([line for line in filetext3.splitlines() if not line.startswith("#")]) + filetext = subprocess.run(command, text=True, input=filetext, stdout=subprocess.PIPE).stdout + filetext = filetext.replace("va_list", "void *") + if remove_function_bodies: + filetext = re.sub('\n{\n(.|\n)*?\n}\n', ';', filetext) + filetext = "\n".join([line for line in filetext.splitlines() if not line.startswith("#")]) file = open("raylib/"+os.path.basename(filename)+".modified", "w") - file.write(filetext4) + file.write(filetext) # print(r) - return filetext4 + return filetext def check_header_exists(file): @@ -102,7 +105,7 @@ def build_unix(): raylib_h = get_the_include_path() + "/raylib.h" rlgl_h = get_the_include_path() + "/rlgl.h" - #raymath_h = get_the_include_path() + "/raymath.h" + raymath_h = get_the_include_path() + "/raymath.h" if not os.path.isfile(raylib_h): raise Exception("ERROR: " + raylib_h + " not found. Please install Raylib.") @@ -110,12 +113,13 @@ def build_unix(): if not os.path.isfile(rlgl_h): raise Exception("ERROR: " + rlgl_h + " not found. Please install Raylib.") - #if not os.path.isfile(raymath_h): - # raise Exception("ERROR: " + raylib_h + " not found. Please install Raylib.") + if not os.path.isfile(raymath_h): + raise Exception("ERROR: " + raylib_h + " not found. Please install Raylib.") ffi_includes = """ #include "raylib.h" #include "rlgl.h" + #include "raymath.h" """ raygui_h = get_the_include_path() + "/raygui.h" @@ -135,9 +139,8 @@ def build_unix(): ffibuilder.cdef(pre_process_header(raylib_h)) ffibuilder.cdef(pre_process_header(rlgl_h)) - #ffibuilder.cdef(pre_process_header(raymath_h)) - #print("******************************\n\n\n") - #print(pre_process_header(rlgl_h)) + ffibuilder.cdef(pre_process_header(raymath_h, True)) + if os.path.isfile(raygui_h): ffibuilder.cdef(pre_process_header(raygui_h)) if os.path.isfile(physac_h): @@ -168,9 +171,11 @@ def build_windows(): ffibuilder.cdef(open("raylib/rlgl.h.modified").read().replace("bool", "int")) ffibuilder.cdef(open("raylib/raygui.h.modified").read().replace("bool", "int")) ffibuilder.cdef(open("raylib/physac.h.modified").read().replace("bool", "int")) + ffibuilder.cdef(open("raylib/raymath.h.modified").read().replace("bool", "int")) ffibuilder.set_source("raylib._raylib_cffi", """ #include "raylib.h" - #include "rlgl.h" + #include "rlgl.h" + #include "raymath.h" #define RAYGUI_IMPLEMENTATION #define RAYGUI_SUPPORT_RICONS #include "raygui.h" diff --git a/raylib/raymath.h.modified b/raylib/raymath.h.modified new file mode 100644 index 0000000..d69e742 --- /dev/null +++ b/raylib/raymath.h.modified @@ -0,0 +1,210 @@ +/********************************************************************************************** +* +* raymath v1.5 - Math functions to work with Vector2, Vector3, Matrix and Quaternions +* +* CONFIGURATION: +* +* #define RAYMATH_IMPLEMENTATION +* Generates the implementation of the library into the included file. +* If not defined, the library is in header only mode and can be included in other headers +* or source files without problems. But only ONE file should hold the implementation. +* +* #define RAYMATH_STATIC_INLINE +* This may use up lots of memory. +* +* CONVENTIONS: +* +* - Functions are always self-contained, no function use another raymath function inside, +* required code is directly re-implemented inside +* - Functions input parameters are always received by value (2 unavoidable exceptions) +* - Functions use always a "result" variable for return +* - Functions are always defined inline +* - Angles are always in radians (DEG2RAD/RAD2DEG macros provided for convenience) +* +* +* LICENSE: zlib/libpng +* +* Copyright (c) 2015-2022 Ramon Santamaria (@raysan5) +* +* This software is provided "as-is", without any express or implied warranty. In no event +* will the authors be held liable for any damages arising from the use of this software. +* +* Permission is granted to anyone to use this software for any purpose, including commercial +* applications, and to alter it and redistribute it freely, subject to the following restrictions: +* +* 1. The origin of this software must not be misrepresented; you must not claim that you +* wrote the original software. If you use this software in a product, an acknowledgment +* in the product documentation would be appreciated but is not required. +* +* 2. Altered source versions must be plainly marked as such, and must not be misrepresented +* as being the original software. +* +* 3. This notice may not be removed or altered from any source distribution. +* +**********************************************************************************************/ +// Function specifiers definition +//---------------------------------------------------------------------------------- +// Defines and Macros +//---------------------------------------------------------------------------------- +// Get float vector for Matrix +// Get float vector for Vector3 +//---------------------------------------------------------------------------------- +// Types and Structures Definition +//---------------------------------------------------------------------------------- +// NOTE: Helper types to be used instead of array return types for *ToFloat functions +typedef struct float3 { + float v[3]; +} float3; +typedef struct float16 { + float v[16]; +} float16; +//---------------------------------------------------------------------------------- +// Module Functions Definition - Utils math +//---------------------------------------------------------------------------------- +// Clamp float value +inline /* Functions may be inlined or external definition used*/ float Clamp(float value, float min, float max); +//{ +// float result = (value < min)? min : value; +// +// if (result > max) result = max; +// +// return result; +//} +// Calculate linear interpolation between two floats +inline /* Functions may be inlined or external definition used*/ float Lerp(float start, float end, float amount);// Normalize input value within input range +inline /* Functions may be inlined or external definition used*/ float Normalize(float value, float start, float end);// Remap input value within input range to output range +inline /* Functions may be inlined or external definition used*/ float Remap(float value, float inputStart, float inputEnd, float outputStart, float outputEnd);// Check whether two given floats are almost equal +inline /* Functions may be inlined or external definition used*/ int FloatEquals(float x, float y);//---------------------------------------------------------------------------------- +// Module Functions Definition - Vector2 math +//---------------------------------------------------------------------------------- +// Vector with components value 0.0f +inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Zero(void);// Vector with components value 1.0f +inline /* Functions may be inlined or external definition used*/ Vector2 Vector2One(void);// Add two vectors (v1 + v2) +inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Add(Vector2 v1, Vector2 v2);// Add vector and float value +inline /* Functions may be inlined or external definition used*/ Vector2 Vector2AddValue(Vector2 v, float add);// Subtract two vectors (v1 - v2) +inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Subtract(Vector2 v1, Vector2 v2);// Subtract vector by float value +inline /* Functions may be inlined or external definition used*/ Vector2 Vector2SubtractValue(Vector2 v, float sub);// Calculate vector length +inline /* Functions may be inlined or external definition used*/ float Vector2Length(Vector2 v);// Calculate vector square length +inline /* Functions may be inlined or external definition used*/ float Vector2LengthSqr(Vector2 v);// Calculate two vectors dot product +inline /* Functions may be inlined or external definition used*/ float Vector2DotProduct(Vector2 v1, Vector2 v2);// Calculate distance between two vectors +inline /* Functions may be inlined or external definition used*/ float Vector2Distance(Vector2 v1, Vector2 v2);// Calculate square distance between two vectors +inline /* Functions may be inlined or external definition used*/ float Vector2DistanceSqr(Vector2 v1, Vector2 v2);// Calculate angle from two vectors +inline /* Functions may be inlined or external definition used*/ float Vector2Angle(Vector2 v1, Vector2 v2);// Scale vector (multiply by value) +inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Scale(Vector2 v, float scale);// Multiply vector by vector +inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Multiply(Vector2 v1, Vector2 v2);// Negate vector +inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Negate(Vector2 v);// Divide vector by vector +inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Divide(Vector2 v1, Vector2 v2);// Normalize provided vector +inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Normalize(Vector2 v);// Transforms a Vector2 by a given Matrix +inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Transform(Vector2 v, Matrix mat);// Calculate linear interpolation between two vectors +inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Lerp(Vector2 v1, Vector2 v2, float amount);// Calculate reflected vector to normal +inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Reflect(Vector2 v, Vector2 normal);// Rotate vector by angle +inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Rotate(Vector2 v, float angle);// Move Vector towards target +inline /* Functions may be inlined or external definition used*/ Vector2 Vector2MoveTowards(Vector2 v, Vector2 target, float maxDistance);// Invert the given vector +inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Invert(Vector2 v);// Clamp the components of the vector between +// min and max values specified by the given vectors +inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Clamp(Vector2 v, Vector2 min, Vector2 max);// Clamp the magnitude of the vector between two min and max values +inline /* Functions may be inlined or external definition used*/ Vector2 Vector2ClampValue(Vector2 v, float min, float max);// Check whether two given vectors are almost equal +inline /* Functions may be inlined or external definition used*/ int Vector2Equals(Vector2 p, Vector2 q);//---------------------------------------------------------------------------------- +// Module Functions Definition - Vector3 math +//---------------------------------------------------------------------------------- +// Vector with components value 0.0f +inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Zero(void);// Vector with components value 1.0f +inline /* Functions may be inlined or external definition used*/ Vector3 Vector3One(void);// Add two vectors +inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Add(Vector3 v1, Vector3 v2);// Add vector and float value +inline /* Functions may be inlined or external definition used*/ Vector3 Vector3AddValue(Vector3 v, float add);// Subtract two vectors +inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Subtract(Vector3 v1, Vector3 v2);// Subtract vector by float value +inline /* Functions may be inlined or external definition used*/ Vector3 Vector3SubtractValue(Vector3 v, float sub);// Multiply vector by scalar +inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Scale(Vector3 v, float scalar);// Multiply vector by vector +inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Multiply(Vector3 v1, Vector3 v2);// Calculate two vectors cross product +inline /* Functions may be inlined or external definition used*/ Vector3 Vector3CrossProduct(Vector3 v1, Vector3 v2);// Calculate one vector perpendicular vector +inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Perpendicular(Vector3 v);// Calculate vector length +inline /* Functions may be inlined or external definition used*/ float Vector3Length(const Vector3 v);// Calculate vector square length +inline /* Functions may be inlined or external definition used*/ float Vector3LengthSqr(const Vector3 v);// Calculate two vectors dot product +inline /* Functions may be inlined or external definition used*/ float Vector3DotProduct(Vector3 v1, Vector3 v2);// Calculate distance between two vectors +inline /* Functions may be inlined or external definition used*/ float Vector3Distance(Vector3 v1, Vector3 v2);// Calculate square distance between two vectors +inline /* Functions may be inlined or external definition used*/ float Vector3DistanceSqr(Vector3 v1, Vector3 v2);// Calculate angle between two vectors +inline /* Functions may be inlined or external definition used*/ float Vector3Angle(Vector3 v1, Vector3 v2);// Negate provided vector (invert direction) +inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Negate(Vector3 v);// Divide vector by vector +inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Divide(Vector3 v1, Vector3 v2);// Normalize provided vector +inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Normalize(Vector3 v);// Orthonormalize provided vectors +// Makes vectors normalized and orthogonal to each other +// Gram-Schmidt function implementation +inline /* Functions may be inlined or external definition used*/ void Vector3OrthoNormalize(Vector3 *v1, Vector3 *v2);// Transforms a Vector3 by a given Matrix +inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Transform(Vector3 v, Matrix mat);// Transform a vector by quaternion rotation +inline /* Functions may be inlined or external definition used*/ Vector3 Vector3RotateByQuaternion(Vector3 v, Quaternion q);// Calculate linear interpolation between two vectors +inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Lerp(Vector3 v1, Vector3 v2, float amount);// Calculate reflected vector to normal +inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Reflect(Vector3 v, Vector3 normal);// Get min value for each pair of components +inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Min(Vector3 v1, Vector3 v2);// Get max value for each pair of components +inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Max(Vector3 v1, Vector3 v2);// Compute barycenter coordinates (u, v, w) for point p with respect to triangle (a, b, c) +// NOTE: Assumes P is on the plane of the triangle +inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Barycenter(Vector3 p, Vector3 a, Vector3 b, Vector3 c);// Projects a Vector3 from screen space into object space +// NOTE: We are avoiding calling other raymath functions despite available +inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Unproject(Vector3 source, Matrix projection, Matrix view);// Get Vector3 as float array +inline /* Functions may be inlined or external definition used*/ float3 Vector3ToFloatV(Vector3 v);// Invert the given vector +inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Invert(Vector3 v);// Clamp the components of the vector between +// min and max values specified by the given vectors +inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Clamp(Vector3 v, Vector3 min, Vector3 max);// Clamp the magnitude of the vector between two values +inline /* Functions may be inlined or external definition used*/ Vector3 Vector3ClampValue(Vector3 v, float min, float max);// Check whether two given vectors are almost equal +inline /* Functions may be inlined or external definition used*/ int Vector3Equals(Vector3 p, Vector3 q);// Compute the direction of a refracted ray where v specifies the +// normalized direction of the incoming ray, n specifies the +// normalized normal vector of the interface of two optical media, +// and r specifies the ratio of the refractive index of the medium +// from where the ray comes to the refractive index of the medium +// on the other side of the surface +inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Refract(Vector3 v, Vector3 n, float r);//---------------------------------------------------------------------------------- +// Module Functions Definition - Matrix math +//---------------------------------------------------------------------------------- +// Compute matrix determinant +inline /* Functions may be inlined or external definition used*/ float MatrixDeterminant(Matrix mat);// Get the trace of the matrix (sum of the values along the diagonal) +inline /* Functions may be inlined or external definition used*/ float MatrixTrace(Matrix mat);// Transposes provided matrix +inline /* Functions may be inlined or external definition used*/ Matrix MatrixTranspose(Matrix mat);// Invert provided matrix +inline /* Functions may be inlined or external definition used*/ Matrix MatrixInvert(Matrix mat);// Get identity matrix +inline /* Functions may be inlined or external definition used*/ Matrix MatrixIdentity(void);// Add two matrices +inline /* Functions may be inlined or external definition used*/ Matrix MatrixAdd(Matrix left, Matrix right);// Subtract two matrices (left - right) +inline /* Functions may be inlined or external definition used*/ Matrix MatrixSubtract(Matrix left, Matrix right);// Get two matrix multiplication +// NOTE: When multiplying matrices... the order matters! +inline /* Functions may be inlined or external definition used*/ Matrix MatrixMultiply(Matrix left, Matrix right);// Get translation matrix +inline /* Functions may be inlined or external definition used*/ Matrix MatrixTranslate(float x, float y, float z);// Create rotation matrix from axis and angle +// NOTE: Angle should be provided in radians +inline /* Functions may be inlined or external definition used*/ Matrix MatrixRotate(Vector3 axis, float angle);// Get x-rotation matrix (angle in radians) +inline /* Functions may be inlined or external definition used*/ Matrix MatrixRotateX(float angle);// Get y-rotation matrix (angle in radians) +inline /* Functions may be inlined or external definition used*/ Matrix MatrixRotateY(float angle);// Get z-rotation matrix (angle in radians) +inline /* Functions may be inlined or external definition used*/ Matrix MatrixRotateZ(float angle);// Get xyz-rotation matrix (angles in radians) +inline /* Functions may be inlined or external definition used*/ Matrix MatrixRotateXYZ(Vector3 ang);// Get zyx-rotation matrix (angles in radians) +inline /* Functions may be inlined or external definition used*/ Matrix MatrixRotateZYX(Vector3 ang);// Get scaling matrix +inline /* Functions may be inlined or external definition used*/ Matrix MatrixScale(float x, float y, float z);// Get perspective projection matrix +inline /* Functions may be inlined or external definition used*/ Matrix MatrixFrustum(double left, double right, double bottom, double top, double near, double far);// Get perspective projection matrix +// NOTE: Angle should be provided in radians +inline /* Functions may be inlined or external definition used*/ Matrix MatrixPerspective(double fovy, double aspect, double near, double far);// Get orthographic projection matrix +inline /* Functions may be inlined or external definition used*/ Matrix MatrixOrtho(double left, double right, double bottom, double top, double near, double far);// Get camera look-at matrix (view matrix) +inline /* Functions may be inlined or external definition used*/ Matrix MatrixLookAt(Vector3 eye, Vector3 target, Vector3 up);// Get float array of matrix data +inline /* Functions may be inlined or external definition used*/ float16 MatrixToFloatV(Matrix mat);//---------------------------------------------------------------------------------- +// Module Functions Definition - Quaternion math +//---------------------------------------------------------------------------------- +// Add two quaternions +inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionAdd(Quaternion q1, Quaternion q2);// Add quaternion and float value +inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionAddValue(Quaternion q, float add);// Subtract two quaternions +inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionSubtract(Quaternion q1, Quaternion q2);// Subtract quaternion and float value +inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionSubtractValue(Quaternion q, float sub);// Get identity quaternion +inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionIdentity(void);// Computes the length of a quaternion +inline /* Functions may be inlined or external definition used*/ float QuaternionLength(Quaternion q);// Normalize provided quaternion +inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionNormalize(Quaternion q);// Invert provided quaternion +inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionInvert(Quaternion q);// Calculate two quaternion multiplication +inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionMultiply(Quaternion q1, Quaternion q2);// Scale quaternion by float value +inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionScale(Quaternion q, float mul);// Divide two quaternions +inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionDivide(Quaternion q1, Quaternion q2);// Calculate linear interpolation between two quaternions +inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionLerp(Quaternion q1, Quaternion q2, float amount);// Calculate slerp-optimized interpolation between two quaternions +inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionNlerp(Quaternion q1, Quaternion q2, float amount);// Calculates spherical linear interpolation between two quaternions +inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionSlerp(Quaternion q1, Quaternion q2, float amount);// Calculate quaternion based on the rotation from one vector to another +inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionFromVector3ToVector3(Vector3 from, Vector3 to);// Get a quaternion for a given rotation matrix +inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionFromMatrix(Matrix mat);// Get a matrix for a given quaternion +inline /* Functions may be inlined or external definition used*/ Matrix QuaternionToMatrix(Quaternion q);// Get rotation quaternion for an angle and axis +// NOTE: angle must be provided in radians +inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionFromAxisAngle(Vector3 axis, float angle);// Get the rotation angle and axis for a given quaternion +inline /* Functions may be inlined or external definition used*/ void QuaternionToAxisAngle(Quaternion q, Vector3 *outAxis, float *outAngle);// Get the quaternion equivalent to Euler angles +// NOTE: Rotation order is ZYX +inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionFromEuler(float pitch, float yaw, float roll);// Get the Euler angles equivalent to quaternion (roll, pitch, yaw) +// NOTE: Angles are returned in a Vector3 struct in radians +inline /* Functions may be inlined or external definition used*/ Vector3 QuaternionToEuler(Quaternion q);// Transform a quaternion given a transformation matrix +inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionTransform(Quaternion q, Matrix mat);// Check whether two given quaternions are almost equal +inline /* Functions may be inlined or external definition used*/ int QuaternionEquals(Quaternion p, Quaternion q); \ No newline at end of file diff --git a/tests/test_raymath.py b/tests/test_raymath.py new file mode 100644 index 0000000..cf1e3d0 --- /dev/null +++ b/tests/test_raymath.py @@ -0,0 +1,12 @@ +""" +This shows how to use the Pyray wrapper around the static binding. +""" + +import pyray as pr + +v1 = pr.Vector2(10,10) +v2 = pr.Vector2(20,20) +v3 = pr.vector2_add(v1, v2) +print(v3.x, v3.y) +v4 = pr.vector2_normalize((20,10)) +print(v4.x, v4.y) \ No newline at end of file