raylib-bindings 0.5.8pre1-x86_64-darwin

Sign up to get free protection for your applications and to get access to all the features.
data/lib/rcamera.rb ADDED
@@ -0,0 +1,117 @@
1
+ # Yet another raylib wrapper for Ruby
2
+ #
3
+ # * https://github.com/vaiorabbit/raylib-bindings
4
+ #
5
+ # [NOTICE] Autogenerated. Do not edit.
6
+
7
+ require 'ffi'
8
+
9
+ module Raylib
10
+ extend FFI::Library
11
+
12
+ # Define/Macro
13
+
14
+
15
+ # Typedef
16
+
17
+ typedef :int, :CameraProjection
18
+ typedef :int, :CameraMode
19
+
20
+ # Function
21
+
22
+ def self.setup_rcamera_symbols
23
+ entries = [
24
+
25
+ # @!method GetCameraForward(camera)
26
+ # GetCameraForward
27
+ # @param camera [Camera *]
28
+ # @return [Vector3]
29
+ [:GetCameraForward, :GetCameraForward, [:pointer], Vector3.by_value],
30
+
31
+ # @!method GetCameraUp(camera)
32
+ # GetCameraUp
33
+ # @param camera [Camera *]
34
+ # @return [Vector3]
35
+ [:GetCameraUp, :GetCameraUp, [:pointer], Vector3.by_value],
36
+
37
+ # @!method GetCameraRight(camera)
38
+ # GetCameraRight
39
+ # @param camera [Camera *]
40
+ # @return [Vector3]
41
+ [:GetCameraRight, :GetCameraRight, [:pointer], Vector3.by_value],
42
+
43
+ # @!method CameraMoveForward(camera, distance, moveInWorldPlane)
44
+ # CameraMoveForward
45
+ # @param camera [Camera *]
46
+ # @param distance [float]
47
+ # @param moveInWorldPlane [bool]
48
+ # @return [void]
49
+ [:CameraMoveForward, :CameraMoveForward, [:pointer, :float, :bool], :void],
50
+
51
+ # @!method CameraMoveUp(camera, distance)
52
+ # CameraMoveUp
53
+ # @param camera [Camera *]
54
+ # @param distance [float]
55
+ # @return [void]
56
+ [:CameraMoveUp, :CameraMoveUp, [:pointer, :float], :void],
57
+
58
+ # @!method CameraMoveRight(camera, distance, moveInWorldPlane)
59
+ # CameraMoveRight
60
+ # @param camera [Camera *]
61
+ # @param distance [float]
62
+ # @param moveInWorldPlane [bool]
63
+ # @return [void]
64
+ [:CameraMoveRight, :CameraMoveRight, [:pointer, :float, :bool], :void],
65
+
66
+ # @!method CameraMoveToTarget(camera, delta)
67
+ # CameraMoveToTarget
68
+ # @param camera [Camera *]
69
+ # @param delta [float]
70
+ # @return [void]
71
+ [:CameraMoveToTarget, :CameraMoveToTarget, [:pointer, :float], :void],
72
+
73
+ # @!method CameraYaw(camera, angle, rotateAroundTarget)
74
+ # CameraYaw
75
+ # @param camera [Camera *]
76
+ # @param angle [float]
77
+ # @param rotateAroundTarget [bool]
78
+ # @return [void]
79
+ [:CameraYaw, :CameraYaw, [:pointer, :float, :bool], :void],
80
+
81
+ # @!method CameraPitch(camera, angle, lockView, rotateAroundTarget, rotateUp)
82
+ # CameraPitch
83
+ # @param camera [Camera *]
84
+ # @param angle [float]
85
+ # @param lockView [bool]
86
+ # @param rotateAroundTarget [bool]
87
+ # @param rotateUp [bool]
88
+ # @return [void]
89
+ [:CameraPitch, :CameraPitch, [:pointer, :float, :bool, :bool, :bool], :void],
90
+
91
+ # @!method CameraRoll(camera, angle)
92
+ # CameraRoll
93
+ # @param camera [Camera *]
94
+ # @param angle [float]
95
+ # @return [void]
96
+ [:CameraRoll, :CameraRoll, [:pointer, :float], :void],
97
+
98
+ # @!method GetCameraViewMatrix(camera)
99
+ # GetCameraViewMatrix
100
+ # @param camera [Camera *]
101
+ # @return [Matrix]
102
+ [:GetCameraViewMatrix, :GetCameraViewMatrix, [:pointer], Matrix.by_value],
103
+
104
+ # @!method GetCameraProjectionMatrix(camera, aspect)
105
+ # GetCameraProjectionMatrix
106
+ # @param camera [Camera*]
107
+ # @param aspect [float]
108
+ # @return [Matrix]
109
+ [:GetCameraProjectionMatrix, :GetCameraProjectionMatrix, [:pointer, :float], Matrix.by_value],
110
+ ]
111
+ entries.each do |entry|
112
+ attach_function entry[0], entry[1], entry[2], entry[3]
113
+ rescue FFI::NotFoundError => e
114
+ warn "[Warning] Failed to import #{entry[0]} (#{e})."
115
+ end
116
+ end
117
+ end