Class: Mittsu::DynamicBufferAttribute

Inherits:
BufferAttribute show all
Defined in:
lib/mittsu/core/dynamic_buffer_attribute.rb

Defined Under Namespace

Classes: UpdateRange

Instance Attribute Summary collapse

Attributes inherited from BufferAttribute

#array, #item_size, #needs_update

Instance Method Summary collapse

Methods inherited from BufferAttribute

#copy_at, #length, #set, #set_x, #set_xy, #set_xyz, #set_xyzw, #set_y, #set_z

Constructor Details

#initialize(array, item_size) ⇒ DynamicBufferAttribute

Returns a new instance of DynamicBufferAttribute.



7
8
9
10
# File 'lib/mittsu/core/dynamic_buffer_attribute.rb', line 7

def initialize(array, item_size)
  super
  @update_range = UpdateRange.new(0, -1)
end

Instance Attribute Details

#update_rangeObject

Returns the value of attribute update_range.



5
6
7
# File 'lib/mittsu/core/dynamic_buffer_attribute.rb', line 5

def update_range
  @update_range
end

Instance Method Details

#cloneObject



12
13
14
# File 'lib/mittsu/core/dynamic_buffer_attribute.rb', line 12

def clone
  Mittsu::DynamicBufferAttribute(self.array.dup, self.item_size)
end