indexing description: "A factory that loads all types of meshes" author: "" date: "$Date$" revision: "$Revision$" class EM3D_COMBINED_MESH_FACTORY inherit EM3D_MESH_FACTORY select load_mesh_internal end EM3D_MESH_OBJ_FACTORY rename load_mesh_internal as load_obj_internal end EM3D_MESH_X_FACTORY rename load_mesh_internal as load_x_internal end EM3D_MESH_BIN_FACTORY rename load_mesh_internal as load_bin_internal end create make feature {NONE} get_timespamp( a_filename: STRING ): INTEGER is -- Get a file's modification date local file: KL_TEXT_OUTPUT_FILE do create file.make ( a_filename ) result := file.time_stamp end load_mesh_internal( a_filename: STRING ) is -- Load a mesh local extension: STRING do extension := a_filename.substring ( a_filename.last_index_of ( '.', a_filename.count), a_filename.count ) extension := extension.as_lower if file_system.file_exists( a_filename+".mesh" ) and get_timespamp( a_filename ) < get_timespamp( a_filename+".mesh" ) then load_bin_internal ( a_filename+".mesh" ) elseif extension.is_equal ( ".obj" ) then load_obj_internal( a_filename ) elseif extension.is_equal ( ".x" ) then load_x_internal( a_filename ) end end end