Refactored ModelCache into a module, misc. fixes due to change.

This commit is contained in:
2020-05-07 21:45:03 -05:00
parent bc480f9fae
commit bc695df4a1
5 changed files with 31 additions and 57 deletions

View File

@@ -3,17 +3,15 @@ class IMICFPS
include CommonMethods
attr_accessor :objects, :materials, :vertices, :uvs, :texures, :normals, :faces, :colors, :bones
attr_accessor :scale, :entity, :material_file, :current_material, :current_object, :vertex_count, :smoothing
attr_accessor :material_file, :current_material, :current_object, :vertex_count, :smoothing
attr_reader :position, :bounding_box, :textured_material, :file_path
attr_reader :positions_buffer_id, :colors_buffer_id, :normals_buffer_id, :uvs_buffer_id, :textures_buffer_id
attr_reader :vertex_array_id
attr_reader :aabb_tree
def initialize(file_path:, entity: nil)
def initialize(file_path:)
@file_path = file_path
@entity = entity
update if @entity
@material_file = nil
@current_object = nil
@@ -232,11 +230,6 @@ class IMICFPS
puts @aabb_tree.inspect if window.config.get(:debug_options, :stats)
end
def update
@position = @entity.position
@scale = @entity.scale
end
def has_texture?
@has_texture
end