Class: Raylib::Matrix

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/raylib/core/structs/matrix.rb

Overview

Matrix, 4x4 components, column major, OpenGL style, right-handed

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.create(m0, m4, m8, m12, m1, m5, m9, m13, m2, m6, m10, m14, m3, m7, m11, m15) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/raylib/core/structs/matrix.rb', line 23

def self.create(m0, m4, m8, m12, m1, m5, m9, m13, m2, m6, m10, m14, m3, m7, m11, m15)
  new.tap do |instance|
    instance[:m0] = m0
    instance[:m4] = m4
    instance[:m8] = m8
    instance[:m12] = m12
    instance[:m1] = m1
    instance[:m5] = m5
    instance[:m9] = m9
    instance[:m13] = m13
    instance[:m2] = m2
    instance[:m6] = m6
    instance[:m10] = m10
    instance[:m14] = m14
    instance[:m3] = m3
    instance[:m7] = m7
    instance[:m11] = m11
    instance[:m15] = m15
  end
end

Instance Method Details

#m0Float

Matrix first row (4 components)

Returns:

  • (Float)

    m0



50
# File 'lib/raylib/core/structs/matrix.rb', line 50

def m0 = self[:m0]

#m0=(new_m0) ⇒ Object

Sets Matrix first row (4 components)



53
54
55
# File 'lib/raylib/core/structs/matrix.rb', line 53

def m0=(new_m0)
  self[:m0] = new_m0
end

#m1Float

Matrix second row (4 components)

Returns:

  • (Float)

    m1



86
# File 'lib/raylib/core/structs/matrix.rb', line 86

def m1 = self[:m1]

#m10Float

Matrix third row (4 components)

Returns:

  • (Float)

    m10



140
# File 'lib/raylib/core/structs/matrix.rb', line 140

def m10 = self[:m10]

#m10=(new_m10) ⇒ Object

Sets Matrix third row (4 components)



143
144
145
# File 'lib/raylib/core/structs/matrix.rb', line 143

def m10=(new_m10)
  self[:m10] = new_m10
end

#m11Float

Matrix fourth row (4 components)

Returns:

  • (Float)

    m11



176
# File 'lib/raylib/core/structs/matrix.rb', line 176

def m11 = self[:m11]

#m11=(new_m11) ⇒ Object

Sets Matrix fourth row (4 components)



179
180
181
# File 'lib/raylib/core/structs/matrix.rb', line 179

def m11=(new_m11)
  self[:m11] = new_m11
end

#m12Float

Matrix first row (4 components)

Returns:

  • (Float)

    m12



77
# File 'lib/raylib/core/structs/matrix.rb', line 77

def m12 = self[:m12]

#m12=(new_m12) ⇒ Object

Sets Matrix first row (4 components)



80
81
82
# File 'lib/raylib/core/structs/matrix.rb', line 80

def m12=(new_m12)
  self[:m12] = new_m12
end

#m13Float

Matrix second row (4 components)

Returns:

  • (Float)

    m13



113
# File 'lib/raylib/core/structs/matrix.rb', line 113

def m13 = self[:m13]

#m13=(new_m13) ⇒ Object

Sets Matrix second row (4 components)



116
117
118
# File 'lib/raylib/core/structs/matrix.rb', line 116

def m13=(new_m13)
  self[:m13] = new_m13
end

#m14Float

Matrix third row (4 components)

Returns:

  • (Float)

    m14



149
# File 'lib/raylib/core/structs/matrix.rb', line 149

def m14 = self[:m14]

#m14=(new_m14) ⇒ Object

Sets Matrix third row (4 components)



152
153
154
# File 'lib/raylib/core/structs/matrix.rb', line 152

def m14=(new_m14)
  self[:m14] = new_m14
end

#m15Float

Matrix fourth row (4 components)

Returns:

  • (Float)

    m15



185
# File 'lib/raylib/core/structs/matrix.rb', line 185

def m15 = self[:m15]

#m15=(new_m15) ⇒ Object

Sets Matrix fourth row (4 components)



188
189
190
# File 'lib/raylib/core/structs/matrix.rb', line 188

def m15=(new_m15)
  self[:m15] = new_m15
end

#m1=(new_m1) ⇒ Object

Sets Matrix second row (4 components)



89
90
91
# File 'lib/raylib/core/structs/matrix.rb', line 89

def m1=(new_m1)
  self[:m1] = new_m1
end

#m2Float

Matrix third row (4 components)

Returns:

  • (Float)

    m2



122
# File 'lib/raylib/core/structs/matrix.rb', line 122

def m2 = self[:m2]

#m2=(new_m2) ⇒ Object

Sets Matrix third row (4 components)



125
126
127
# File 'lib/raylib/core/structs/matrix.rb', line 125

def m2=(new_m2)
  self[:m2] = new_m2
end

#m3Float

Matrix fourth row (4 components)

Returns:

  • (Float)

    m3



158
# File 'lib/raylib/core/structs/matrix.rb', line 158

def m3 = self[:m3]

#m3=(new_m3) ⇒ Object

Sets Matrix fourth row (4 components)



161
162
163
# File 'lib/raylib/core/structs/matrix.rb', line 161

def m3=(new_m3)
  self[:m3] = new_m3
end

#m4Float

Matrix first row (4 components)

Returns:

  • (Float)

    m4



59
# File 'lib/raylib/core/structs/matrix.rb', line 59

def m4 = self[:m4]

#m4=(new_m4) ⇒ Object

Sets Matrix first row (4 components)



62
63
64
# File 'lib/raylib/core/structs/matrix.rb', line 62

def m4=(new_m4)
  self[:m4] = new_m4
end

#m5Float

Matrix second row (4 components)

Returns:

  • (Float)

    m5



95
# File 'lib/raylib/core/structs/matrix.rb', line 95

def m5 = self[:m5]

#m5=(new_m5) ⇒ Object

Sets Matrix second row (4 components)



98
99
100
# File 'lib/raylib/core/structs/matrix.rb', line 98

def m5=(new_m5)
  self[:m5] = new_m5
end

#m6Float

Matrix third row (4 components)

Returns:

  • (Float)

    m6



131
# File 'lib/raylib/core/structs/matrix.rb', line 131

def m6 = self[:m6]

#m6=(new_m6) ⇒ Object

Sets Matrix third row (4 components)



134
135
136
# File 'lib/raylib/core/structs/matrix.rb', line 134

def m6=(new_m6)
  self[:m6] = new_m6
end

#m7Float

Matrix fourth row (4 components)

Returns:

  • (Float)

    m7



167
# File 'lib/raylib/core/structs/matrix.rb', line 167

def m7 = self[:m7]

#m7=(new_m7) ⇒ Object

Sets Matrix fourth row (4 components)



170
171
172
# File 'lib/raylib/core/structs/matrix.rb', line 170

def m7=(new_m7)
  self[:m7] = new_m7
end

#m8Float

Matrix first row (4 components)

Returns:

  • (Float)

    m8



68
# File 'lib/raylib/core/structs/matrix.rb', line 68

def m8 = self[:m8]

#m8=(new_m8) ⇒ Object

Sets Matrix first row (4 components)



71
72
73
# File 'lib/raylib/core/structs/matrix.rb', line 71

def m8=(new_m8)
  self[:m8] = new_m8
end

#m9Float

Matrix second row (4 components)

Returns:

  • (Float)

    m9



104
# File 'lib/raylib/core/structs/matrix.rb', line 104

def m9 = self[:m9]

#m9=(new_m9) ⇒ Object

Sets Matrix second row (4 components)



107
108
109
# File 'lib/raylib/core/structs/matrix.rb', line 107

def m9=(new_m9)
  self[:m9] = new_m9
end

#to_sObject



44
45
46
# File 'lib/raylib/core/structs/matrix.rb', line 44

def to_s
  "Raylib::Matrix##{object_id} m0=#{m0} m4=#{m4} m8=#{m8} m12=#{m12} m1=#{m1} m5=#{m5} m9=#{m9} m13=#{m13} m2=#{m2} m6=#{m6} m10=#{m10} m14=#{m14} m3=#{m3} m7=#{m7} m11=#{m11} m15=#{m15}"
end