Class: Raylib::VrStereoConfig

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

Overview

VrStereoConfig, VR stereo rendering configuration for simulator

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.create(projection, view_offset, left_lens_center, right_lens_center, left_screen_center, right_screen_center, scale, scale_in) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/raylib/core/structs/vr_stereo_config.rb', line 15

def self.create(projection, view_offset, left_lens_center, right_lens_center, left_screen_center, right_screen_center, scale, scale_in)
  new.tap do |instance|
    instance[:projection] = projection
    instance[:viewOffset] = view_offset
    instance[:leftLensCenter] = left_lens_center
    instance[:rightLensCenter] = right_lens_center
    instance[:leftScreenCenter] = left_screen_center
    instance[:rightScreenCenter] = right_screen_center
    instance[:scale] = scale
    instance[:scaleIn] = scale_in
  end
end

Instance Method Details

#left_lens_centerfloat[2]

VR left lens center

Returns:

  • (float[2])

    leftLensCenter



52
# File 'lib/raylib/core/structs/vr_stereo_config.rb', line 52

def left_lens_center = self[:leftLensCenter]

#left_lens_center=(new_left_lens_center) ⇒ Object

Sets VR left lens center



55
56
57
# File 'lib/raylib/core/structs/vr_stereo_config.rb', line 55

def left_lens_center=(new_left_lens_center)
  self[:leftLensCenter] = new_left_lens_center
end

#left_screen_centerfloat[2]

VR left screen center

Returns:

  • (float[2])

    leftScreenCenter



70
# File 'lib/raylib/core/structs/vr_stereo_config.rb', line 70

def left_screen_center = self[:leftScreenCenter]

#left_screen_center=(new_left_screen_center) ⇒ Object

Sets VR left screen center



73
74
75
# File 'lib/raylib/core/structs/vr_stereo_config.rb', line 73

def left_screen_center=(new_left_screen_center)
  self[:leftScreenCenter] = new_left_screen_center
end

#projectionMatrix[2]

VR projection matrices (per eye)

Returns:



34
# File 'lib/raylib/core/structs/vr_stereo_config.rb', line 34

def projection = self[:projection]

#projection=(new_projection) ⇒ Object

Sets VR projection matrices (per eye)



37
38
39
# File 'lib/raylib/core/structs/vr_stereo_config.rb', line 37

def projection=(new_projection)
  self[:projection] = new_projection
end

#right_lens_centerfloat[2]

VR right lens center

Returns:

  • (float[2])

    rightLensCenter



61
# File 'lib/raylib/core/structs/vr_stereo_config.rb', line 61

def right_lens_center = self[:rightLensCenter]

#right_lens_center=(new_right_lens_center) ⇒ Object

Sets VR right lens center



64
65
66
# File 'lib/raylib/core/structs/vr_stereo_config.rb', line 64

def right_lens_center=(new_right_lens_center)
  self[:rightLensCenter] = new_right_lens_center
end

#right_screen_centerfloat[2]

VR right screen center

Returns:

  • (float[2])

    rightScreenCenter



79
# File 'lib/raylib/core/structs/vr_stereo_config.rb', line 79

def right_screen_center = self[:rightScreenCenter]

#right_screen_center=(new_right_screen_center) ⇒ Object

Sets VR right screen center



82
83
84
# File 'lib/raylib/core/structs/vr_stereo_config.rb', line 82

def right_screen_center=(new_right_screen_center)
  self[:rightScreenCenter] = new_right_screen_center
end

#scalefloat[2]

VR distortion scale

Returns:

  • (float[2])

    scale



88
# File 'lib/raylib/core/structs/vr_stereo_config.rb', line 88

def scale = self[:scale]

#scale=(new_scale) ⇒ Object

Sets VR distortion scale



91
92
93
# File 'lib/raylib/core/structs/vr_stereo_config.rb', line 91

def scale=(new_scale)
  self[:scale] = new_scale
end

#scale_infloat[2]

VR distortion scale in

Returns:

  • (float[2])

    scaleIn



97
# File 'lib/raylib/core/structs/vr_stereo_config.rb', line 97

def scale_in = self[:scaleIn]

#scale_in=(new_scale_in) ⇒ Object

Sets VR distortion scale in



100
101
102
# File 'lib/raylib/core/structs/vr_stereo_config.rb', line 100

def scale_in=(new_scale_in)
  self[:scaleIn] = new_scale_in
end

#to_sObject



28
29
30
# File 'lib/raylib/core/structs/vr_stereo_config.rb', line 28

def to_s
  "Raylib::VrStereoConfig##{object_id} projection=#{projection} view_offset=#{view_offset} left_lens_center=#{left_lens_center} right_lens_center=#{right_lens_center} left_screen_center=#{left_screen_center} right_screen_center=#{right_screen_center} scale=#{scale} scale_in=#{scale_in}"
end

#view_offsetMatrix[2]

VR view offset matrices (per eye)

Returns:



43
# File 'lib/raylib/core/structs/vr_stereo_config.rb', line 43

def view_offset = self[:viewOffset]

#view_offset=(new_view_offset) ⇒ Object

Sets VR view offset matrices (per eye)



46
47
48
# File 'lib/raylib/core/structs/vr_stereo_config.rb', line 46

def view_offset=(new_view_offset)
  self[:viewOffset] = new_view_offset
end