Class: TinyGLTF::BufferView

Inherits:
Object
  • Object
show all
Includes:
Base
Defined in:
lib/tiny_gltf.rb,
ext/tiny_gltf/rb_tiny_gltf_init.c

Instance Attribute Summary

Attributes included from Base

#model

Instance Method Summary collapse

Methods included from Base

included, #inspect, #to_h, #to_json

Instance Method Details

#bufferObject



263
264
265
# File 'lib/tiny_gltf.rb', line 263

def buffer
  model.buffers[buffer_index]
end

#to_ptrObject



267
268
269
# File 'lib/tiny_gltf.rb', line 267

def to_ptr
  Fiddle::Pointer.new(buffer.to_ptr + byte_offset, byte_length)
end